1 | export interface Argument {
|
2 | name: string;
|
3 | description: string;
|
4 | type: string;
|
5 | isRequired: boolean;
|
6 | isArray: boolean;
|
7 | isType: boolean;
|
8 | isScalar: boolean;
|
9 | isInterface: boolean;
|
10 | isUnion: boolean;
|
11 | isInputType: boolean;
|
12 | isEnum: boolean;
|
13 | }
|
14 | export interface Field {
|
15 | name: string;
|
16 | description: string;
|
17 | arguments: Argument[];
|
18 | type: string;
|
19 | isArray: boolean;
|
20 | isRequired: boolean;
|
21 | hasArguments: boolean;
|
22 | isType: boolean;
|
23 | isScalar: boolean;
|
24 | isInterface: boolean;
|
25 | isUnion: boolean;
|
26 | isInputType: boolean;
|
27 | isEnum: boolean;
|
28 | }
|
29 | export interface Type {
|
30 | fields: Field[];
|
31 | description: string;
|
32 | name: string;
|
33 | isInputType: boolean;
|
34 | interfaces: string[];
|
35 | hasFields: boolean;
|
36 | hasInterfaces: boolean;
|
37 | }
|
38 | export interface Scalar {
|
39 | name: string;
|
40 | description: string;
|
41 | }
|
42 | export interface Enum {
|
43 | name: string;
|
44 | description: string;
|
45 | values: EnumValue[];
|
46 | }
|
47 | export interface EnumValue {
|
48 | name: string;
|
49 | value: string;
|
50 | description: string;
|
51 | }
|
52 | export interface Union {
|
53 | name: string;
|
54 | description: string;
|
55 | possibleTypes: string[];
|
56 | }
|
57 | export interface Interface {
|
58 | name: string;
|
59 | description: string;
|
60 | fields: Field[];
|
61 | hasFields: boolean;
|
62 | }
|
63 | export interface SchemaTemplateContext {
|
64 | types: Type[];
|
65 | inputTypes: Type[];
|
66 | enums: Enum[];
|
67 | unions: Union[];
|
68 | interfaces: Interface[];
|
69 | scalars: Scalar[];
|
70 | hasTypes: boolean;
|
71 | hasInputTypes: boolean;
|
72 | hasEnums: boolean;
|
73 | hasUnions: boolean;
|
74 | hasScalars: boolean;
|
75 | hasInterfaces: boolean;
|
76 | }
|
77 | export interface SelectionSetItem {
|
78 | isFragmentSpread: boolean;
|
79 | isInlineFragment: boolean;
|
80 | isField: boolean;
|
81 | isLeaf: boolean;
|
82 | }
|
83 | export interface SelectionSetInlineFragment extends SelectionSetItem {
|
84 | selectionSet: SelectionSetItem[];
|
85 | onType: string;
|
86 | fields: SelectionSetFieldNode[];
|
87 | fragmentsSpread: SelectionSetFragmentSpread[];
|
88 | inlineFragments: SelectionSetInlineFragment[];
|
89 | hasFragmentsSpread: boolean;
|
90 | hasInlineFragments: boolean;
|
91 | hasFields: boolean;
|
92 | }
|
93 | export interface SelectionSetFragmentSpread extends SelectionSetItem {
|
94 | fragmentName: string;
|
95 | }
|
96 | export interface SelectionSetFieldNode extends SelectionSetItem {
|
97 | selectionSet: SelectionSetItem[];
|
98 | name: string;
|
99 | type: string;
|
100 | isRequired: boolean;
|
101 | isArray: boolean;
|
102 | fields: SelectionSetFieldNode[];
|
103 | fragmentsSpread: SelectionSetFragmentSpread[];
|
104 | inlineFragments: SelectionSetInlineFragment[];
|
105 | hasFragmentsSpread: boolean;
|
106 | hasInlineFragments: boolean;
|
107 | hasFields: boolean;
|
108 | }
|
109 | export declare function isFieldNode(node: SelectionSetItem): node is SelectionSetFieldNode;
|
110 | export declare function isFragmentSpreadNode(node: SelectionSetItem): node is SelectionSetFragmentSpread;
|
111 | export declare function isInlineFragmentNode(node: SelectionSetItem): node is SelectionSetInlineFragment;
|
112 | export interface Fragment {
|
113 | name: string;
|
114 | selectionSet: SelectionSetItem[];
|
115 | onType: string;
|
116 | document: string;
|
117 | }
|
118 | export interface Operation {
|
119 | name: string;
|
120 | selectionSet: SelectionSetItem[];
|
121 | operationType: string;
|
122 | variables: Variable[];
|
123 | hasVariables: boolean;
|
124 | isQuery: boolean;
|
125 | isMutation: boolean;
|
126 | isSubscription: boolean;
|
127 | document: string;
|
128 | }
|
129 | export interface Variable {
|
130 | name: string;
|
131 | type: string;
|
132 | isRequired: boolean;
|
133 | isArray: boolean;
|
134 | }
|
135 | export interface Document {
|
136 | fragments: Fragment[];
|
137 | operations: Operation[];
|
138 | hasFragments: boolean;
|
139 | hasOperations: boolean;
|
140 | }
|