@@ -39,31 +39,31 @@ __Schema = types.object({
39
39
kind = types .nonNull (types .list (types .nonNull (__Type ))),
40
40
resolve = function (schema )
41
41
return util .values (schema :getTypeMap ())
42
- end
42
+ end ,
43
43
},
44
44
45
45
queryType = {
46
46
description = ' The type that query operations will be rooted at.' ,
47
47
kind = __Type .nonNull ,
48
48
resolve = function (schema )
49
49
return schema :getQueryType ()
50
- end
50
+ end ,
51
51
},
52
52
53
53
mutationType = {
54
54
description = ' If this server supports mutation, the type that mutation operations will be rooted at.' ,
55
55
kind = __Type ,
56
56
resolve = function (schema )
57
57
return schema :getMutationType ()
58
- end
58
+ end ,
59
59
},
60
60
61
61
subscriptionType = {
62
62
description = ' If this server supports mutation, the type that mutation operations will be rooted at.' ,
63
63
kind = __Type ,
64
64
resolve = function (_ )
65
65
return nil
66
- end
66
+ end ,
67
67
},
68
68
69
69
@@ -72,7 +72,7 @@ __Schema = types.object({
72
72
kind = types .nonNull (types .list (types .nonNull (__Directive ))),
73
73
resolve = function (schema )
74
74
return schema .directives
75
- end
75
+ end ,
76
76
}
77
77
}
78
78
end
@@ -111,12 +111,12 @@ __Directive = types.object({
111
111
if directive .onInlineFragment then table.insert (res , ' INLINE_FRAGMENT' ) end
112
112
113
113
return res
114
- end
114
+ end ,
115
115
},
116
116
117
117
args = {
118
118
kind = types .nonNull (types .list (types .nonNull (__InputValue ))),
119
- resolve = resolveArgs
119
+ resolve = resolveArgs ,
120
120
}
121
121
}
122
122
end
@@ -133,33 +133,33 @@ __DirectiveLocation = types.enum({
133
133
values = {
134
134
QUERY = {
135
135
value = ' QUERY' ,
136
- description = ' Location adjacent to a query operation.'
136
+ description = ' Location adjacent to a query operation.' ,
137
137
},
138
138
139
139
MUTATION = {
140
140
value = ' MUTATION' ,
141
- description = ' Location adjacent to a mutation operation.'
141
+ description = ' Location adjacent to a mutation operation.' ,
142
142
},
143
143
144
144
FIELD = {
145
145
value = ' FIELD' ,
146
- description = ' Location adjacent to a field.'
146
+ description = ' Location adjacent to a field.' ,
147
147
},
148
148
149
149
FRAGMENT_DEFINITION = {
150
150
value = ' FRAGMENT_DEFINITION' ,
151
- description = ' Location adjacent to a fragment definition.'
151
+ description = ' Location adjacent to a fragment definition.' ,
152
152
},
153
153
154
154
FRAGMENT_SPREAD = {
155
155
value = ' FRAGMENT_SPREAD' ,
156
- description = ' Location adjacent to a fragment spread.'
156
+ description = ' Location adjacent to a fragment spread.' ,
157
157
},
158
158
159
159
INLINE_FRAGMENT = {
160
160
value = ' INLINE_FRAGMENT' ,
161
- description = ' Location adjacent to an inline fragment.'
162
- }
161
+ description = ' Location adjacent to an inline fragment.' ,
162
+ },
163
163
}
164
164
})
165
165
@@ -205,15 +205,15 @@ __Type = types.object({
205
205
end
206
206
207
207
error (' Unknown type ' .. kind )
208
- end
208
+ end ,
209
209
},
210
210
211
211
fields = {
212
212
kind = types .list (types .nonNull (__Field )),
213
213
arguments = {
214
214
includeDeprecated = {
215
215
kind = types .boolean ,
216
- defaultValue = false
216
+ defaultValue = false ,
217
217
}
218
218
},
219
219
resolve = function (kind , arguments )
@@ -233,7 +233,7 @@ __Type = types.object({
233
233
if kind .__type == ' Object' then
234
234
return kind .interfaces or {}
235
235
end
236
- end
236
+ end ,
237
237
},
238
238
239
239
possibleTypes = {
@@ -242,7 +242,7 @@ __Type = types.object({
242
242
if kind .__type == ' Interface' or kind .__type == ' Union' then
243
243
return context .schema :getPossibleTypes (kind )
244
244
end
245
- end
245
+ end ,
246
246
},
247
247
248
248
enumValues = {
@@ -256,7 +256,7 @@ __Type = types.object({
256
256
return arguments .includeDeprecated or not value .deprecationReason
257
257
end )
258
258
end
259
- end
259
+ end ,
260
260
},
261
261
262
262
inputFields = {
@@ -265,12 +265,12 @@ __Type = types.object({
265
265
if kind .__type == ' InputObject' then
266
266
return util .values (kind .fields )
267
267
end
268
- end
268
+ end ,
269
269
},
270
270
271
271
ofType = {
272
- kind = __Type
273
- }
272
+ kind = __Type ,
273
+ },
274
274
}
275
275
end
276
276
})
@@ -290,24 +290,24 @@ __Field = types.object({
290
290
291
291
args = {
292
292
kind = types .nonNull (types .list (types .nonNull (__InputValue ))),
293
- resolve = resolveArgs
293
+ resolve = resolveArgs ,
294
294
},
295
295
296
296
type = {
297
297
kind = __Type .nonNull ,
298
298
resolve = function (field )
299
299
return field .kind
300
- end
300
+ end ,
301
301
},
302
302
303
303
isDeprecated = {
304
304
kind = types .boolean .nonNull ,
305
305
resolve = function (field )
306
306
return field .deprecationReason ~= nil
307
- end
307
+ end ,
308
308
},
309
309
310
- deprecationReason = types .string
310
+ deprecationReason = types .string ,
311
311
}
312
312
end
313
313
})
@@ -330,16 +330,16 @@ __InputValue = types.object({
330
330
kind = types .nonNull (__Type ),
331
331
resolve = function (field )
332
332
return field .kind
333
- end
333
+ end ,
334
334
},
335
335
336
336
defaultValue = {
337
337
kind = types .string ,
338
338
description = ' A GraphQL-formatted string representing the default value for this input value.' ,
339
339
resolve = function (inputVal )
340
340
return inputVal .defaultValue and tostring (inputVal .defaultValue ) -- TODO improve serialization a lot
341
- end
342
- }
341
+ end ,
342
+ },
343
343
}
344
344
end
345
345
})
@@ -361,7 +361,7 @@ __EnumValue = types.object({
361
361
kind = types .boolean .nonNull ,
362
362
resolve = function (enumValue ) return enumValue .deprecationReason ~= nil end
363
363
},
364
- deprecationReason = types .string
364
+ deprecationReason = types .string ,
365
365
}
366
366
end
367
367
})
@@ -372,43 +372,43 @@ __TypeKind = types.enum({
372
372
values = {
373
373
SCALAR = {
374
374
value = ' SCALAR' ,
375
- description = ' Indicates this type is a scalar.'
375
+ description = ' Indicates this type is a scalar.' ,
376
376
},
377
377
378
378
OBJECT = {
379
379
value = ' OBJECT' ,
380
- description = ' Indicates this type is an object. `fields` and `interfaces` are valid fields.'
380
+ description = ' Indicates this type is an object. `fields` and `interfaces` are valid fields.' ,
381
381
},
382
382
383
383
INTERFACE = {
384
384
value = ' INTERFACE' ,
385
- description = ' Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.'
385
+ description = ' Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.' ,
386
386
},
387
387
388
388
UNION = {
389
389
value = ' UNION' ,
390
- description = ' Indicates this type is a union. `possibleTypes` is a valid field.'
390
+ description = ' Indicates this type is a union. `possibleTypes` is a valid field.' ,
391
391
},
392
392
393
393
ENUM = {
394
394
value = ' ENUM' ,
395
- description = ' Indicates this type is an enum. `enumValues` is a valid field.'
395
+ description = ' Indicates this type is an enum. `enumValues` is a valid field.' ,
396
396
},
397
397
398
398
INPUT_OBJECT = {
399
399
value = ' INPUT_OBJECT' ,
400
- description = ' Indicates this type is an input object. `inputFields` is a valid field.'
400
+ description = ' Indicates this type is an input object. `inputFields` is a valid field.' ,
401
401
},
402
402
403
403
LIST = {
404
404
value = ' LIST' ,
405
- description = ' Indicates this type is a list. `ofType` is a valid field.'
405
+ description = ' Indicates this type is a list. `ofType` is a valid field.' ,
406
406
},
407
407
408
408
NON_NULL = {
409
409
value = ' NON_NULL' ,
410
- description = ' Indicates this type is a non-null. `ofType` is a valid field.'
411
- }
410
+ description = ' Indicates this type is a non-null. `ofType` is a valid field.' ,
411
+ },
412
412
}
413
413
})
414
414
@@ -419,19 +419,19 @@ local Schema = {
419
419
arguments = {},
420
420
resolve = function (_ , _ , info )
421
421
return info .schema
422
- end
422
+ end ,
423
423
}
424
424
425
425
local Type = {
426
426
name = ' __type' ,
427
427
kind = __Type ,
428
428
description = ' Request the type information of a single type.' ,
429
429
arguments = {
430
- name = types .string .nonNull
430
+ name = types .string .nonNull ,
431
431
},
432
432
resolve = function (_ , arguments , info )
433
433
return info .schema :getType (arguments .name )
434
- end
434
+ end ,
435
435
}
436
436
437
437
local TypeName = {
@@ -441,7 +441,7 @@ local TypeName = {
441
441
arguments = {},
442
442
resolve = function (_ , _ , info )
443
443
return info .parentType .name
444
- end
444
+ end ,
445
445
}
446
446
447
447
return {
@@ -458,6 +458,6 @@ return {
458
458
fieldMap = {
459
459
__schema = Schema ,
460
460
__type = Type ,
461
- __typename = TypeName
462
- }
461
+ __typename = TypeName ,
462
+ },
463
463
}
0 commit comments