18
18
19
19
__Schema = GraphQLObjectType (
20
20
'__Schema' ,
21
- description = 'A GraphQL Schema defines the capabilities of a GraphQL '
22
- 'server. It exposes all available types and directives on '
23
- 'the server, as well as the entry points for query and '
24
- 'mutation operations.' ,
21
+ description = 'A GraphQL Schema defines the capabilities of a GraphQL server. It '
22
+ 'exposes all available types and directives on the server, as well as '
23
+ 'the entry points for query and mutation operations.' ,
25
24
fields = lambda : OrderedDict ([
26
25
('types' , GraphQLField (
27
26
description = 'A list of all types supported by this server.' ,
54
53
55
54
__Directive = GraphQLObjectType (
56
55
'__Directive' ,
56
+ description = 'A Directives provides a way to describe alternate runtime execution and '
57
+ 'type validation behavior in a GraphQL document.'
58
+ '\n \n In some cases, you need to provide options to alter GraphQL\' s '
59
+ 'execution behavior in ways field arguments will not suffice, such as '
60
+ 'conditionally including or skipping a field. Directives provide this by '
61
+ 'describing additional information to the executor.' ,
57
62
fields = lambda : OrderedDict ([
58
63
('name' , GraphQLField (GraphQLNonNull (GraphQLString ))),
59
64
('description' , GraphQLField (GraphQLString )),
@@ -143,6 +148,14 @@ def input_fields(type, *_):
143
148
144
149
__Type = GraphQLObjectType (
145
150
'__Type' ,
151
+ description = 'The fundamental unit of any GraphQL Schema is the type. There are '
152
+ 'many kinds of types in GraphQL as represented by the `__TypeKind` enum.'
153
+ '\n \n Depending on the kind of a type, certain fields describe '
154
+ 'information about that type. Scalar types provide no information '
155
+ 'beyond a name and description, while Enum types provide their values. '
156
+ 'Object and Interface types provide the fields they describe. Abstract '
157
+ 'types, Union and Interface, provide the Object types possible '
158
+ 'at runtime. List and NonNull types compose other types.' ,
146
159
fields = lambda : OrderedDict ([
147
160
('kind' , GraphQLField (
148
161
type = GraphQLNonNull (__TypeKind ),
@@ -190,6 +203,8 @@ def input_fields(type, *_):
190
203
191
204
__Field = GraphQLObjectType (
192
205
'__Field' ,
206
+ description = 'Object and Interface types are described by a list of Fields, each of '
207
+ 'which has a name, potentially a list of arguments, and a return type.' ,
193
208
fields = lambda : OrderedDict ([
194
209
('name' , GraphQLField (GraphQLNonNull (GraphQLString ))),
195
210
('description' , GraphQLField (GraphQLString )),
@@ -211,6 +226,9 @@ def input_fields(type, *_):
211
226
212
227
__InputValue = GraphQLObjectType (
213
228
'__InputValue' ,
229
+ description = 'Arguments provided to Fields or Directives and the input fields of an '
230
+ 'InputObject are represented as Input Values which describe their type '
231
+ 'and optionally a default value.' ,
214
232
fields = lambda : OrderedDict ([
215
233
('name' , GraphQLField (GraphQLNonNull (GraphQLString ))),
216
234
('description' , GraphQLField (GraphQLString )),
@@ -225,6 +243,9 @@ def input_fields(type, *_):
225
243
226
244
__EnumValue = GraphQLObjectType (
227
245
'__EnumValue' ,
246
+ description = 'One possible value for a given Enum. Enum values are unique values, not '
247
+ 'a placeholder for a string or numeric value. However an Enum value is '
248
+ 'returned in a JSON response as a string.' ,
228
249
fields = lambda : OrderedDict ([
229
250
('name' , GraphQLField (GraphQLNonNull (GraphQLString ))),
230
251
('description' , GraphQLField (GraphQLString )),
@@ -240,7 +261,7 @@ def input_fields(type, *_):
240
261
241
262
__TypeKind = GraphQLEnumType (
242
263
'__TypeKind' ,
243
- description = 'An enum describing what kind of type a given __Type is' ,
264
+ description = 'An enum describing what kind of type a given ` __Type` is' ,
244
265
values = OrderedDict ([
245
266
('SCALAR' , GraphQLEnumValue (
246
267
TypeKind .SCALAR ,
@@ -305,7 +326,8 @@ def input_fields(type, *_):
305
326
del TypeMetaFieldDef_args_name
306
327
307
328
TypeNameMetaFieldDef = GraphQLField (
308
- GraphQLNonNull (GraphQLString ),
329
+ type = GraphQLNonNull (GraphQLString ),
330
+ description = 'The name of the current Object type at runtime.' ,
309
331
resolver = lambda source , args , info : info .parent_type .name ,
310
332
args = []
311
333
)
0 commit comments