apollostack/graphql-server - how to get the fields requested in a query from resolver
2020-Jan answer
The current answer to getting the fields requested in a GraphQL query, is to use the graphql-parse-resolve-info
library for parsing the info
parameter.
The library is "a pretty complete solution and is actually used under the hood by postgraphile", and is recommended going forward by the author of the other top library for parsing the info
field, graphql-fields
.