@graphql-mesh/fusion-execution
Version:
Runtime for Fusion Supergraph
10 lines (9 loc) • 492 B
text/typescript
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[];