UNPKG

@graphql-mesh/fusion-execution

Version:
10 lines (9 loc) 492 B
import { FieldNode, FragmentDefinitionNode, SelectionNode, SelectionSetNode } from 'graphql'; export interface FlattenedFieldNode extends FieldNode { selectionSet?: FlattenedSelectionSet; defer?: boolean; } export interface FlattenedSelectionSet extends SelectionSetNode { selections: FlattenedFieldNode[]; } export declare function flattenSelections(selections: readonly SelectionNode[], fragments: Record<string, FragmentDefinitionNode>, defer?: boolean): FlattenedFieldNode[];