/
introspectionQuery.js
204 lines (183 loc) · 3.96 KB
/
introspectionQuery.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/* @flow */
/**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
export var introspectionQuery = `
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name
description
args {
...InputValue
}
onOperation
onFragment
onField
}
}
}
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type { ...TypeRef }
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
`;
export type IntrospectionQuery = {
__schema: IntrospectionSchema
}
export type IntrospectionSchema = {
queryType: IntrospectionNamedTypeRef;
mutationType: ?IntrospectionNamedTypeRef;
subscriptionType: ?IntrospectionNamedTypeRef;
types: Array<IntrospectionType>;
directives: Array<IntrospectionDirective>;
}
export type IntrospectionType =
IntrospectionScalarType |
IntrospectionObjectType |
IntrospectionInterfaceType |
IntrospectionUnionType |
IntrospectionEnumType |
IntrospectionInputObjectType
export type IntrospectionScalarType = {
kind: 'SCALAR';
name: string;
description: ?string;
}
export type IntrospectionObjectType = {
kind: 'OBJECT';
name: string;
description: ?string;
fields: Array<IntrospectionField>;
interfaces: Array<IntrospectionNamedTypeRef>;
}
export type IntrospectionInterfaceType = {
kind: 'INTERFACE';
name: string;
description: ?string;
fields: Array<IntrospectionField>;
possibleTypes: Array<IntrospectionNamedTypeRef>;
}
export type IntrospectionUnionType = {
kind: 'UNION';
name: string;
description: ?string;
possibleTypes: Array<IntrospectionNamedTypeRef>;
}
export type IntrospectionEnumType = {
kind: 'ENUM';
name: string;
description: ?string;
enumValues: Array<IntrospectionEnumValue>;
}
export type IntrospectionInputObjectType = {
kind: 'INPUT_OBJECT';
name: string;
description: ?string;
inputFields: Array<IntrospectionInputValue>;
}
export type IntrospectionTypeRef =
IntrospectionNamedTypeRef |
IntrospectionListTypeRef |
IntrospectionNonNullTypeRef
export type IntrospectionNamedTypeRef = {
kind: string;
name: string;
}
export type IntrospectionListTypeRef = {
kind: 'LIST';
ofType?: IntrospectionTypeRef;
}
export type IntrospectionNonNullTypeRef = {
kind: 'NON_NULL';
ofType?: IntrospectionTypeRef;
}
export type IntrospectionField = {
name: string;
description: ?string;
args: Array<IntrospectionInputValue>;
type: IntrospectionTypeRef;
isDeprecated: boolean;
deprecationReason: ?string;
}
export type IntrospectionInputValue = {
name: string;
description: ?string;
type: IntrospectionTypeRef;
defaultValue: ?string;
}
export type IntrospectionEnumValue = {
name: string;
description: ?string;
isDeprecated: boolean;
deprecationReason: ?string;
}
export type IntrospectionDirective = {
name: string;
description: ?string;
args: Array<IntrospectionInputValue>;
onOperation: boolean;
onFragment: boolean;
onField: boolean;
}