@@ -83,19 +83,19 @@ export const __Directive = new GraphQLObjectType({
83
83
( {
84
84
name : {
85
85
type : GraphQLNonNull ( GraphQLString ) ,
86
- resolve : obj => obj . name ,
86
+ resolve : directive => directive . name ,
87
87
} ,
88
88
description : {
89
89
type : GraphQLString ,
90
- resolve : obj => obj . description ,
90
+ resolve : directive => directive . description ,
91
91
} ,
92
92
isRepeatable : {
93
93
type : GraphQLNonNull ( GraphQLBoolean ) ,
94
- resolve : obj => obj . isRepeatable ,
94
+ resolve : directive => directive . isRepeatable ,
95
95
} ,
96
96
locations : {
97
97
type : GraphQLNonNull ( GraphQLList ( GraphQLNonNull ( __DirectiveLocation ) ) ) ,
98
- resolve : obj => obj . locations ,
98
+ resolve : directive => directive . locations ,
99
99
} ,
100
100
args : {
101
101
type : GraphQLNonNull ( GraphQLList ( GraphQLNonNull ( __InputValue ) ) ) ,
@@ -228,12 +228,12 @@ export const __Type = new GraphQLObjectType({
228
228
} ,
229
229
name : {
230
230
type : GraphQLString ,
231
- resolve : obj => ( obj . name !== undefined ? obj . name : undefined ) ,
231
+ resolve : type => ( type . name !== undefined ? type . name : undefined ) ,
232
232
} ,
233
233
description : {
234
234
type : GraphQLString ,
235
- resolve : obj =>
236
- obj . description !== undefined ? obj . description : undefined ,
235
+ resolve : type =>
236
+ type . description !== undefined ? type . description : undefined ,
237
237
} ,
238
238
fields : {
239
239
type : GraphQLList ( GraphQLNonNull ( __Field ) ) ,
@@ -292,7 +292,7 @@ export const __Type = new GraphQLObjectType({
292
292
} ,
293
293
ofType : {
294
294
type : __Type ,
295
- resolve : obj => ( obj . ofType !== undefined ? obj . ofType : undefined ) ,
295
+ resolve : type => ( type . ofType !== undefined ? type . ofType : undefined ) ,
296
296
} ,
297
297
} : GraphQLFieldConfigMap < GraphQLType , mixed > ) ,
298
298
} ) ;
@@ -305,27 +305,27 @@ export const __Field = new GraphQLObjectType({
305
305
( {
306
306
name : {
307
307
type : GraphQLNonNull ( GraphQLString ) ,
308
- resolve : obj => obj . name ,
308
+ resolve : field => field . name ,
309
309
} ,
310
310
description : {
311
311
type : GraphQLString ,
312
- resolve : obj => obj . description ,
312
+ resolve : field => field . description ,
313
313
} ,
314
314
args : {
315
315
type : GraphQLNonNull ( GraphQLList ( GraphQLNonNull ( __InputValue ) ) ) ,
316
316
resolve : field => field . args ,
317
317
} ,
318
318
type : {
319
319
type : GraphQLNonNull ( __Type ) ,
320
- resolve : obj => obj . type ,
320
+ resolve : field => field . type ,
321
321
} ,
322
322
isDeprecated : {
323
323
type : GraphQLNonNull ( GraphQLBoolean ) ,
324
- resolve : obj => obj . isDeprecated ,
324
+ resolve : field => field . isDeprecated ,
325
325
} ,
326
326
deprecationReason : {
327
327
type : GraphQLString ,
328
- resolve : obj => obj . deprecationReason ,
328
+ resolve : field => field . deprecationReason ,
329
329
} ,
330
330
} : GraphQLFieldConfigMap < GraphQLField < mixed , mixed > , mixed > ) ,
331
331
} ) ;
@@ -338,22 +338,23 @@ export const __InputValue = new GraphQLObjectType({
338
338
( {
339
339
name : {
340
340
type : GraphQLNonNull ( GraphQLString ) ,
341
- resolve : obj => obj . name ,
341
+ resolve : inputValue => inputValue . name ,
342
342
} ,
343
343
description : {
344
344
type : GraphQLString ,
345
- resolve : obj => obj . description ,
345
+ resolve : inputValue => inputValue . description ,
346
346
} ,
347
347
type : {
348
348
type : GraphQLNonNull ( __Type ) ,
349
- resolve : obj => obj . type ,
349
+ resolve : inputValue => inputValue . type ,
350
350
} ,
351
351
defaultValue : {
352
352
type : GraphQLString ,
353
353
description :
354
354
'A GraphQL-formatted string representing the default value for this input value.' ,
355
- resolve ( inputVal ) {
356
- const valueAST = astFromValue ( inputVal . defaultValue , inputVal . type ) ;
355
+ resolve ( inputValue ) {
356
+ const { type, defaultValue } = inputValue ;
357
+ const valueAST = astFromValue ( defaultValue , type ) ;
357
358
return valueAST ? print ( valueAST ) : null ;
358
359
} ,
359
360
} ,
@@ -368,19 +369,19 @@ export const __EnumValue = new GraphQLObjectType({
368
369
( {
369
370
name : {
370
371
type : GraphQLNonNull ( GraphQLString ) ,
371
- resolve : obj => obj . name ,
372
+ resolve : enumValue => enumValue . name ,
372
373
} ,
373
374
description : {
374
375
type : GraphQLString ,
375
- resolve : obj => obj . description ,
376
+ resolve : enumValue => enumValue . description ,
376
377
} ,
377
378
isDeprecated : {
378
379
type : GraphQLNonNull ( GraphQLBoolean ) ,
379
- resolve : obj => obj . isDeprecated ,
380
+ resolve : enumValue => enumValue . isDeprecated ,
380
381
} ,
381
382
deprecationReason : {
382
383
type : GraphQLString ,
383
- resolve : obj => obj . deprecationReason ,
384
+ resolve : enumValue => enumValue . deprecationReason ,
384
385
} ,
385
386
} : GraphQLFieldConfigMap < GraphQLEnumValue , mixed > ) ,
386
387
} ) ;
0 commit comments