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

Function: collectFieldsDependsOnVariables()

collectFieldsDependsOnVariables(document): boolean

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

True when @skip / @include / @defer use a variable if argument 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