Nested Resolvers
Learn how to define and implement nested GraphQL resolvers.
We'll cover the following
Defining our schema
In this lesson, we’ll add a new User type that represents information about a user who has created a post about a particular product. We’ll update our schema so that when a consumer of GraphQL API fetches data about a product, they can also fetch data about the user who posted it.
Each user object in our application will have the following fields:
id
: The unique identifier of a user.userName
: User’s screen name on the website.fullName
: A user’s full name.
To add support for this in our schema, we need to define a new User
type with these three fields:
Get hands-on with 1400+ tech skills courses.