1 | import { FieldNode, FragmentDefinitionNode, FragmentSpreadNode, GraphQLObjectType, GraphQLSchema, InlineFragmentNode, SelectionSetNode } from 'graphql';
|
2 | export interface PatchFields {
|
3 | label: string | undefined;
|
4 | fields: Map<string, Array<FieldNode>>;
|
5 | }
|
6 | export interface FieldsAndPatches {
|
7 | fields: Map<string, Array<FieldNode>>;
|
8 | patches: Array<PatchFields>;
|
9 | }
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | export declare function collectFields<TVariables = any>(schema: GraphQLSchema, fragments: Record<string, FragmentDefinitionNode>, variableValues: TVariables, runtimeType: GraphQLObjectType, selectionSet: SelectionSetNode): FieldsAndPatches;
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export declare function shouldIncludeNode(variableValues: any, node: FragmentSpreadNode | FieldNode | InlineFragmentNode): boolean;
|
24 |
|
25 |
|
26 |
|
27 | export declare function doesFragmentConditionMatch(schema: GraphQLSchema, fragment: FragmentDefinitionNode | InlineFragmentNode, type: GraphQLObjectType): boolean;
|
28 |
|
29 |
|
30 |
|
31 | export declare function getFieldEntryKey(node: FieldNode): string;
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | export declare function getDeferValues(variableValues: any, node: FragmentSpreadNode | InlineFragmentNode): undefined | {
|
38 | label: string | undefined;
|
39 | };
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export declare const collectSubFields: (schema: GraphQLSchema, fragments: Record<string, FragmentDefinitionNode>, variableValues: {
|
50 | [variable: string]: unknown;
|
51 | }, returnType: GraphQLObjectType, fieldNodes: Array<FieldNode>) => FieldsAndPatches;
|