@@ -7,6 +7,7 @@ let __Schema = try! GraphQLObjectType(
7
7
" exposes all available types and directives on the server, as well as " +
8
8
" the entry points for query, mutation, and subscription operations. " ,
9
9
fields: [
10
+ " description " : GraphQLField ( type: GraphQLString) ,
10
11
" types " : GraphQLField (
11
12
type: GraphQLNonNull ( GraphQLList ( GraphQLNonNull ( __Type) ) ) ,
12
13
description: " A list of all types supported by this server. " ,
@@ -75,7 +76,7 @@ let __Directive = try! GraphQLObjectType(
75
76
description:
76
77
" A Directive provides a way to describe alternate runtime execution and " +
77
78
" type validation behavior in a GraphQL document. " +
78
- " \n \n In some cases, you need to provide options to alter GraphQL \" s " +
79
+ " \n \n In some cases, you need to provide options to alter GraphQL' s " +
79
80
" execution behavior in ways field arguments will not suffice, such as " +
80
81
" conditionally including or skipping a field. Directives provide this by " +
81
82
" describing additional information to the executor. " ,
@@ -86,6 +87,9 @@ let __Directive = try! GraphQLObjectType(
86
87
" locations " : GraphQLField ( type: GraphQLNonNull ( GraphQLList ( GraphQLNonNull ( __DirectiveLocation) ) ) ) ,
87
88
" args " : GraphQLField (
88
89
type: GraphQLNonNull ( GraphQLList ( GraphQLNonNull ( __InputValue) ) ) ,
90
+ args: [
91
+ " includeDeprecated " : GraphQLArgument ( type: GraphQLBoolean, defaultValue: false ) ,
92
+ ] ,
89
93
resolve: { directive, _, _, _ -> [ GraphQLArgumentDefinition ] ? in
90
94
guard let directive = directive as? GraphQLDirective else {
91
95
return nil
@@ -131,6 +135,14 @@ let __DirectiveLocation = try! GraphQLEnumType(
131
135
value: Map ( DirectiveLocation . inlineFragment. rawValue) ,
132
136
description: " Location adjacent to an inline fragment. "
133
137
) ,
138
+ " VARIABLE_DEFINITION " : GraphQLEnumValue (
139
+ value: Map ( DirectiveLocation . variableDefinition. rawValue) ,
140
+ description: " Location adjacent to an operation variable definition. "
141
+ ) ,
142
+ " FRAGMENT_VARIABLE_DEFINITION " : GraphQLEnumValue (
143
+ value: Map ( DirectiveLocation . fragmentVariableDefinition. rawValue) ,
144
+ description: " Location adjacent to a fragment variable definition. "
145
+ ) ,
134
146
" SCHEMA " : GraphQLEnumValue (
135
147
value: Map ( DirectiveLocation . schema. rawValue) ,
136
148
description: " Location adjacent to a schema definition. "
@@ -183,10 +195,10 @@ let __Type: GraphQLObjectType = {
183
195
name: " __Type " ,
184
196
description:
185
197
" The fundamental unit of any GraphQL Schema is the type. There are " +
186
- " many kinds of types in GraphQL as represented by the `__TypeKind` enum. " +
198
+ " many kinds of types in GraphQL as represented by the \\ `__TypeKind \\ ` enum. " +
187
199
" \n \n Depending on the kind of a type, certain fields describe " +
188
200
" information about that type. Scalar types provide no information " +
189
- " beyond a name and description and optional `specifiedByURL`, while Enum types provide their values. " +
201
+ " beyond a name, description and optional \\ `specifiedByURL \\ `, while Enum types provide their values. " +
190
202
" Object and Interface types provide the fields they describe. Abstract " +
191
203
" types, Union and Interface, provide the Object types possible " +
192
204
" at runtime. List and NonNull types compose other types. " ,
@@ -303,6 +315,12 @@ let __Type: GraphQLObjectType = {
303
315
) ,
304
316
" inputFields " : GraphQLField (
305
317
type: GraphQLList ( GraphQLNonNull ( __InputValue) ) ,
318
+ args: [
319
+ " includeDeprecated " : GraphQLArgument (
320
+ type: GraphQLBoolean,
321
+ defaultValue: false
322
+ ) ,
323
+ ] ,
306
324
resolve: { type, _, _, _ -> [ InputObjectFieldDefinition ] ? in
307
325
guard let type = type as? GraphQLInputObjectType else {
308
326
return nil
@@ -337,6 +355,9 @@ let __Field = try! GraphQLObjectType(
337
355
" description " : GraphQLField ( type: GraphQLString) ,
338
356
" args " : GraphQLField (
339
357
type: GraphQLNonNull ( GraphQLList ( GraphQLNonNull ( __InputValue) ) ) ,
358
+ args: [
359
+ " includeDeprecated " : GraphQLArgument ( type: GraphQLBoolean, defaultValue: false ) ,
360
+ ] ,
340
361
resolve: { field, _, _, _ -> [ GraphQLArgumentDefinition ] ? in
341
362
guard let field = field as? GraphQLFieldDefinition else {
342
363
return nil
@@ -386,6 +407,8 @@ let __InputValue = try! GraphQLObjectType(
386
407
return . string( print ( ast: literal) )
387
408
}
388
409
) ,
410
+ " isDeprecated " : GraphQLField ( type: GraphQLNonNull ( GraphQLBoolean) ) ,
411
+ " deprecationReason " : GraphQLField ( type: GraphQLString) ,
389
412
]
390
413
)
391
414
@@ -417,7 +440,7 @@ public enum TypeKind: String, Encodable {
417
440
418
441
let __TypeKind = try ! GraphQLEnumType (
419
442
name: " __TypeKind " ,
420
- description: " An enum describing what kind of type a given `__Type` is. " ,
443
+ description: " An enum describing what kind of type a given \\ `__Type \\ ` is. " ,
421
444
values: [
422
445
" SCALAR " : GraphQLEnumValue (
423
446
value: Map ( TypeKind . scalar. rawValue) ,
@@ -426,37 +449,37 @@ let __TypeKind = try! GraphQLEnumType(
426
449
" OBJECT " : GraphQLEnumValue (
427
450
value: Map ( TypeKind . object. rawValue) ,
428
451
description: " Indicates this type is an object. " +
429
- " `fields` and `interfaces` are valid fields. "
452
+ " \\ `fields \\ ` and \\ `interfaces \\ ` are valid fields. "
430
453
) ,
431
454
" INTERFACE " : GraphQLEnumValue (
432
455
value: Map ( TypeKind . interface. rawValue) ,
433
456
description: " Indicates this type is an interface. " +
434
- " `fields`, `interfaces`, and `possibleTypes` are valid fields. "
457
+ " \\ `fields \\ `, \\ `interfaces \\ `, and \\ `possibleTypes \\ ` are valid fields. "
435
458
) ,
436
459
" UNION " : GraphQLEnumValue (
437
460
value: Map ( TypeKind . union. rawValue) ,
438
461
description: " Indicates this type is a union. " +
439
- " `possibleTypes` is a valid field. "
462
+ " \\ `possibleTypes \\ ` is a valid field. "
440
463
) ,
441
464
" ENUM " : GraphQLEnumValue (
442
465
value: Map ( TypeKind . enum. rawValue) ,
443
466
description: " Indicates this type is an enum. " +
444
- " `enumValues` is a valid field. "
467
+ " \\ `enumValues \\ ` is a valid field. "
445
468
) ,
446
469
" INPUT_OBJECT " : GraphQLEnumValue (
447
470
value: Map ( TypeKind . inputObject. rawValue) ,
448
471
description: " Indicates this type is an input object. " +
449
- " `inputFields` is a valid field. "
472
+ " \\ `inputFields \\ ` is a valid field. "
450
473
) ,
451
474
" LIST " : GraphQLEnumValue (
452
475
value: Map ( TypeKind . list. rawValue) ,
453
476
description: " Indicates this type is a list. " +
454
- " `ofType` is a valid field. "
477
+ " \\ `ofType \\ ` is a valid field. "
455
478
) ,
456
479
" NON_NULL " : GraphQLEnumValue (
457
480
value: Map ( TypeKind . nonNull. rawValue) ,
458
481
description: " Indicates this type is a non-null. " +
459
- " `ofType` is a valid field. "
482
+ " \\ `ofType \\ ` is a valid field. "
460
483
) ,
461
484
]
462
485
)
0 commit comments