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