Complete the code to define a resolver function that receives the parent object.
const resolver = ([1], args, context, info) => { return args.id; }
The first argument in a resolver function is commonly called parent. It represents the result returned from the resolver on the parent field.
Complete the code to access the arguments passed to the resolver.
const resolver = (parent, [1], context, info) => { return args.name; }
The second argument in a resolver function is args. It contains the arguments passed to the field in the query.
Fix the error in the resolver signature by correctly naming the context argument.
const resolver = (parent, args, [1], info) => { return context.user.id; }
The third argument is context. It provides shared data like authentication info to all resolvers.
Fill both blanks to complete the resolver function signature with correct argument names.
const resolver = ([1], [2], context, info) => { return args.id; }
The first two arguments are parent and args. They represent the parent object and the arguments passed to the field.
Fill all three blanks to complete the full resolver function signature with correct argument names.
const resolver = ([1], [2], [3], info) => { return context.user; }
The resolver function signature is (parent, args, context, info). These arguments provide data from the parent, the query arguments, shared context, and query info.