import { DirectiveNode, FieldNode, FragmentDefinitionNode, SelectionNode } from 'graphql'; /** * Collects all fields selected by the given selection node * * For field nodes, this is just the field node * For fragments, this is all the fields requested by the fragment (recursively) * * This is basically the same as graphql-js' collectFields() * https://github.com/graphql/graphql-js/blob/d052f6597b88eae1c06b3c9a7c74434878dde902/src/execution/execute.js#L406 * * We need to duplicate the logic here because graphql-js only supports pulling fields one after the other via the * resolve callbacks, but we need to build the whole query structure before any data has been resolved * * This is similar to expandSelections from language-utils but does a shouldIncludeNode filter at each level */ export declare function resolveSelections(selections: ReadonlyArray, context: { readonly variableValues: { readonly [key: string]: unknown; }; readonly fragments: { readonly [key: string]: FragmentDefinitionNode | undefined; }; }): ReadonlyArray; /** * Determines if a FieldNode should be included based on its directives * * Copied from (slightly modified): * https://github.com/graphql/graphql-js/blob/d052f6597b88eae1c06b3c9a7c74434878dde902/src/execution/execute.js#L472 * * * @param directives the directives of the field node * @param variableValues variables supplied to the query * @returns true if the node should be included, false if it should be skipped */ export declare function shouldIncludeNode(directives: ReadonlyArray, variableValues: { [key: string]: any; }): boolean;