Skip to Content
GraphQL Tools
DocumentationAPI@graphql-tools/utilssrcfunctionscollectFieldsDependsOnVariables

Function: collectFieldsDependsOnVariables()

collectFieldsDependsOnVariables(document): boolean

Defined in: packages/utils/src/collectFields.ts:31 

True when @skip / @include / @defer use a variable argument that affects collected fields (if, and for @defer also label) somewhere in the document. In that case collected field sets depend on runtime variable values; otherwise collectFields results are stable for a given schema, fragments, type and selection set.

Parameters

document

DocumentNode

Returns

boolean