1 | import { Maybe } from '../jsutils/Maybe';
|
2 |
|
3 | import { DirectiveLocationEnum } from '../language/directiveLocation';
|
4 |
|
5 | export interface IntrospectionOptions {
|
6 |
|
7 |
|
8 | descriptions?: boolean;
|
9 |
|
10 |
|
11 |
|
12 | specifiedByUrl?: boolean;
|
13 |
|
14 |
|
15 |
|
16 | directiveIsRepeatable?: boolean;
|
17 |
|
18 |
|
19 |
|
20 | schemaDescription?: boolean;
|
21 |
|
22 |
|
23 |
|
24 | inputValueDeprecation?: boolean;
|
25 | }
|
26 |
|
27 | export function getIntrospectionQuery(options?: IntrospectionOptions): string;
|
28 |
|
29 | export interface IntrospectionQuery {
|
30 | readonly __schema: IntrospectionSchema;
|
31 | }
|
32 |
|
33 | export interface IntrospectionSchema {
|
34 | readonly queryType: IntrospectionNamedTypeRef<IntrospectionObjectType>;
|
35 | readonly mutationType: Maybe<
|
36 | IntrospectionNamedTypeRef<IntrospectionObjectType>
|
37 | >;
|
38 | readonly subscriptionType: Maybe<
|
39 | IntrospectionNamedTypeRef<IntrospectionObjectType>
|
40 | >;
|
41 | readonly types: ReadonlyArray<IntrospectionType>;
|
42 | readonly directives: ReadonlyArray<IntrospectionDirective>;
|
43 | }
|
44 |
|
45 | export type IntrospectionType =
|
46 | | IntrospectionScalarType
|
47 | | IntrospectionObjectType
|
48 | | IntrospectionInterfaceType
|
49 | | IntrospectionUnionType
|
50 | | IntrospectionEnumType
|
51 | | IntrospectionInputObjectType;
|
52 |
|
53 | export type IntrospectionOutputType =
|
54 | | IntrospectionScalarType
|
55 | | IntrospectionObjectType
|
56 | | IntrospectionInterfaceType
|
57 | | IntrospectionUnionType
|
58 | | IntrospectionEnumType;
|
59 |
|
60 | export type IntrospectionInputType =
|
61 | | IntrospectionScalarType
|
62 | | IntrospectionEnumType
|
63 | | IntrospectionInputObjectType;
|
64 |
|
65 | export interface IntrospectionScalarType {
|
66 | readonly kind: 'SCALAR';
|
67 | readonly name: string;
|
68 | readonly description?: Maybe<string>;
|
69 | readonly specifiedByUrl?: Maybe<string>;
|
70 | }
|
71 |
|
72 | export interface IntrospectionObjectType {
|
73 | readonly kind: 'OBJECT';
|
74 | readonly name: string;
|
75 | readonly description?: Maybe<string>;
|
76 | readonly fields: ReadonlyArray<IntrospectionField>;
|
77 | readonly interfaces: ReadonlyArray<
|
78 | IntrospectionNamedTypeRef<IntrospectionInterfaceType>
|
79 | >;
|
80 | }
|
81 |
|
82 | export interface IntrospectionInterfaceType {
|
83 | readonly kind: 'INTERFACE';
|
84 | readonly name: string;
|
85 | readonly description?: Maybe<string>;
|
86 | readonly fields: ReadonlyArray<IntrospectionField>;
|
87 | readonly interfaces: ReadonlyArray<
|
88 | IntrospectionNamedTypeRef<IntrospectionInterfaceType>
|
89 | >;
|
90 | readonly possibleTypes: ReadonlyArray<
|
91 | IntrospectionNamedTypeRef<IntrospectionObjectType>
|
92 | >;
|
93 | }
|
94 |
|
95 | export interface IntrospectionUnionType {
|
96 | readonly kind: 'UNION';
|
97 | readonly name: string;
|
98 | readonly description?: Maybe<string>;
|
99 | readonly possibleTypes: ReadonlyArray<
|
100 | IntrospectionNamedTypeRef<IntrospectionObjectType>
|
101 | >;
|
102 | }
|
103 |
|
104 | export interface IntrospectionEnumType {
|
105 | readonly kind: 'ENUM';
|
106 | readonly name: string;
|
107 | readonly description?: Maybe<string>;
|
108 | readonly enumValues: ReadonlyArray<IntrospectionEnumValue>;
|
109 | }
|
110 |
|
111 | export interface IntrospectionInputObjectType {
|
112 | readonly kind: 'INPUT_OBJECT';
|
113 | readonly name: string;
|
114 | readonly description?: Maybe<string>;
|
115 | readonly inputFields: ReadonlyArray<IntrospectionInputValue>;
|
116 | }
|
117 |
|
118 | export interface IntrospectionListTypeRef<
|
119 | T extends IntrospectionTypeRef = IntrospectionTypeRef
|
120 | > {
|
121 | readonly kind: 'LIST';
|
122 | readonly ofType: T;
|
123 | }
|
124 |
|
125 | export interface IntrospectionNonNullTypeRef<
|
126 | T extends IntrospectionTypeRef = IntrospectionTypeRef
|
127 | > {
|
128 | readonly kind: 'NON_NULL';
|
129 | readonly ofType: T;
|
130 | }
|
131 |
|
132 | export type IntrospectionTypeRef =
|
133 | | IntrospectionNamedTypeRef
|
134 | | IntrospectionListTypeRef<any>
|
135 | | IntrospectionNonNullTypeRef<
|
136 | IntrospectionNamedTypeRef | IntrospectionListTypeRef<any>
|
137 | >;
|
138 |
|
139 | export type IntrospectionOutputTypeRef =
|
140 | | IntrospectionNamedTypeRef<IntrospectionOutputType>
|
141 | | IntrospectionListTypeRef<any>
|
142 | | IntrospectionNonNullTypeRef<
|
143 | | IntrospectionNamedTypeRef<IntrospectionOutputType>
|
144 | | IntrospectionListTypeRef<any>
|
145 | >;
|
146 |
|
147 | export type IntrospectionInputTypeRef =
|
148 | | IntrospectionNamedTypeRef<IntrospectionInputType>
|
149 | | IntrospectionListTypeRef<any>
|
150 | | IntrospectionNonNullTypeRef<
|
151 | | IntrospectionNamedTypeRef<IntrospectionInputType>
|
152 | | IntrospectionListTypeRef<any>
|
153 | >;
|
154 |
|
155 | export interface IntrospectionNamedTypeRef<
|
156 | T extends IntrospectionType = IntrospectionType
|
157 | > {
|
158 | readonly kind: T['kind'];
|
159 | readonly name: string;
|
160 | }
|
161 |
|
162 | export interface IntrospectionField {
|
163 | readonly name: string;
|
164 | readonly description?: Maybe<string>;
|
165 | readonly args: ReadonlyArray<IntrospectionInputValue>;
|
166 | readonly type: IntrospectionOutputTypeRef;
|
167 | readonly isDeprecated: boolean;
|
168 | readonly deprecationReason?: Maybe<string>;
|
169 | }
|
170 |
|
171 | export interface IntrospectionInputValue {
|
172 | readonly name: string;
|
173 | readonly description?: Maybe<string>;
|
174 | readonly type: IntrospectionInputTypeRef;
|
175 | readonly defaultValue?: Maybe<string>;
|
176 | readonly isDeprecated?: boolean;
|
177 | readonly deprecationReason?: Maybe<string>;
|
178 | }
|
179 |
|
180 | export interface IntrospectionEnumValue {
|
181 | readonly name: string;
|
182 | readonly description?: Maybe<string>;
|
183 | readonly isDeprecated: boolean;
|
184 | readonly deprecationReason?: Maybe<string>;
|
185 | }
|
186 |
|
187 | export interface IntrospectionDirective {
|
188 | readonly name: string;
|
189 | readonly description?: Maybe<string>;
|
190 | readonly isRepeatable?: boolean;
|
191 | readonly locations: ReadonlyArray<DirectiveLocationEnum>;
|
192 | readonly args: ReadonlyArray<IntrospectionInputValue>;
|
193 | }
|