How to get requested fields inside GraphQL resolver?
In graphql-js resolvers expose a fourth argument called resolve info. This field contains more information about the field. From the GraphQL docs GraphQLObjectType config parameter type definition: // See below about resolver functions. type GraphQLFieldResolveFn = ( source?: any, args?: {[argName: string]: any}, context?: any, info?: GraphQLResolveInfo ) => any type GraphQLResolveInfo = { fieldName: … Read more