graphql-list-fields
When implementing a GraphQL server, it can be useful to know the list of fields being queried on a given type. This module takes a GraphQLResolveInfo object and returns a list of fields.
Supported features
- Basic Fields
- Fragments
- Inline Fragments
@skip
and@include
directives- Nested fields into dot.notation
npm install --save graphql-list-fields
Usage
; // in some resolve function { const fields = ; return ;}