Request data from 2 tables by GraphQL and combine themNested GraphQL servers / microservicesapollostack/graphql-server - how to get the fields requested in a query from resolverApollo graphql-connected React component isn't rerenderinggraphql role based authorizationGraphQL + Sequelize resolver giving null dataHow to implement auto refresh token in graphql for jwt based authentication?GraphQL data modelling - extended types (Prisma)Cursor pagination Apollo/GraphQL, update total pageNumber after data mutaitonMongoose + GraphQL (Apollo Server) Schemaapollo graphql server privacy control after data is fetched

Sci-fi novel: ark ship from Earth is sent into space to another planet, one man woken early from cryosleep paints a giant mural

How to communicate to my GM that not being allowed to use stealth isn't fun for me?

60s or 70s novel about Empire of Man making 1st contact with 1st discovered alien race

Is there a set of positive integers of density 1 which contains no infinite arithmetic progression?

What is the logic behind taxing money for property?

Why was this person allowed to become Grand Maester?

With Ubuntu 18.04, how can I have a hot corner that locks the computer?

Why are MBA programs closing in the United States?

Did Apple bundle a specific monitor with the Apple II+ for schools?

Can all groups be thought of as the symmetries of a geometrical object?

Draw a line with an isolated and accumulation point in mathbbR

Why can my keyboard only digest 6 keypresses at a time?

What differences exist between adamantine and adamantite in all editions of D&D?

Non-aqueous eyes?

What are some really overused phrases in French that are common nowadays?

Why is long-term living in Almost-Earth causing severe health problems?

Is it safe to change the harddrive power feature so that it never turns off?

Why am I Seeing A Weird "Notch" on the Data Line For Some Logical 1s?

Can a human be transformed into a Mind Flayer?

How creative should the DM let an artificer be in terms of what they can build?

Russian word for a male zebra

Why not invest in precious metals?

Electricity free spaceship

Solve Riddle With Algebra



Request data from 2 tables by GraphQL and combine them


Nested GraphQL servers / microservicesapollostack/graphql-server - how to get the fields requested in a query from resolverApollo graphql-connected React component isn't rerenderinggraphql role based authorizationGraphQL + Sequelize resolver giving null dataHow to implement auto refresh token in graphql for jwt based authentication?GraphQL data modelling - extended types (Prisma)Cursor pagination Apollo/GraphQL, update total pageNumber after data mutaitonMongoose + GraphQL (Apollo Server) Schemaapollo graphql server privacy control after data is fetched






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















Using Apollo for GraphQL, I have 2 tables:




1) Sticker_Packs (where i keep models of sticker pack)



2) User_Stickers (where i keep ids sticker packs that user added in
his collection with 2 main column: "user_id" and "sticker_pack_id")




When I'm requesting Sticker_Packs catalogue - I need to get additional field with Bool value flag (based on User_Stickers table) to know if user added this sticker pack to his collection or not.



But I can't figure out how to do it by GrahpQL by one request. Can somebody please give me some example how to handle it?










share|improve this question
























  • You can have a field resolver for a field on type Sticker_Packs.

    – Pavan Bahuguni
    Mar 25 at 7:33

















0















Using Apollo for GraphQL, I have 2 tables:




1) Sticker_Packs (where i keep models of sticker pack)



2) User_Stickers (where i keep ids sticker packs that user added in
his collection with 2 main column: "user_id" and "sticker_pack_id")




When I'm requesting Sticker_Packs catalogue - I need to get additional field with Bool value flag (based on User_Stickers table) to know if user added this sticker pack to his collection or not.



But I can't figure out how to do it by GrahpQL by one request. Can somebody please give me some example how to handle it?










share|improve this question
























  • You can have a field resolver for a field on type Sticker_Packs.

    – Pavan Bahuguni
    Mar 25 at 7:33













0












0








0








Using Apollo for GraphQL, I have 2 tables:




1) Sticker_Packs (where i keep models of sticker pack)



2) User_Stickers (where i keep ids sticker packs that user added in
his collection with 2 main column: "user_id" and "sticker_pack_id")




When I'm requesting Sticker_Packs catalogue - I need to get additional field with Bool value flag (based on User_Stickers table) to know if user added this sticker pack to his collection or not.



But I can't figure out how to do it by GrahpQL by one request. Can somebody please give me some example how to handle it?










share|improve this question
















Using Apollo for GraphQL, I have 2 tables:




1) Sticker_Packs (where i keep models of sticker pack)



2) User_Stickers (where i keep ids sticker packs that user added in
his collection with 2 main column: "user_id" and "sticker_pack_id")




When I'm requesting Sticker_Packs catalogue - I need to get additional field with Bool value flag (based on User_Stickers table) to know if user added this sticker pack to his collection or not.



But I can't figure out how to do it by GrahpQL by one request. Can somebody please give me some example how to handle it?







graphql apollo-server






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 25 at 2:05









Pavel Smirnov

2,6061818




2,6061818










asked Mar 24 at 19:53









user2154220user2154220

6817




6817












  • You can have a field resolver for a field on type Sticker_Packs.

    – Pavan Bahuguni
    Mar 25 at 7:33

















  • You can have a field resolver for a field on type Sticker_Packs.

    – Pavan Bahuguni
    Mar 25 at 7:33
















You can have a field resolver for a field on type Sticker_Packs.

– Pavan Bahuguni
Mar 25 at 7:33





You can have a field resolver for a field on type Sticker_Packs.

– Pavan Bahuguni
Mar 25 at 7:33












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55327937%2frequest-data-from-2-tables-by-graphql-and-combine-them%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55327937%2frequest-data-from-2-tables-by-graphql-and-combine-them%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript