GraphQL - Resolvers
Consider the following resolver chain:
What is the output of the query?
const resolvers = {
Query: {
post: () => ({ id: 10, title: 'GraphQL Rocks' })
},
Post: {
summary: (parent) => parent.title.slice(0, 7)
}
};What is the output of the query?
{ post { summary } }