Fetch relational data from multiple data sources using nested resolvers | GraphQL Master class

preview_player
Показать описание

We do not have flat data structures on production data. we have a parent-child relationship on data and also parent and child may stay in two different data sources. for example, Employees may store in a database but projects may be stored on some other location and exposed via Rest endpoint. this video shows how we can use GraphQL to expose a single endpoint for these multi-data sourced relational data.

Apollo Server needs to know how to populate data for every field in your schema so that it can respond to requests for that data. To accomplish this, it uses resolvers.

A resolver is a function that's responsible for populating the data for a single field in your schema. It can populate that data in any way you define, such as by fetching data from a back-end database or a third-party API.
Рекомендации по теме
Комментарии
Автор

Thank you so much for this! Our team at work was starting to use GraphQL and we ran into this exact use case - we had a list of id's and we needed to make API calls for each id to get more details. Nested queries solves this problem flawlessly!

TheBeastDispenser
Автор

Thank you very much for these videos (all GraphQL data sources series). Very easy to follow and nicely explained!

FalconStakepool
Автор

That's what I was looking for. Nested resolvers. Finally, got this brilliant one. Thank you sooo much!

bhagabatiprasad
Автор

Nicely explained everything slowly and clearly, better for lazy developers like myself. Expecting another video(s) showing how to do mutations and combine 2 Graphql endpoints together.

rukshannet
Автор

Hello sir. I have questions regarding graph ql..

parinitajha
welcome to shbcf.ru