File tree Expand file tree Collapse file tree 2 files changed +66
-50
lines changed Expand file tree Collapse file tree 2 files changed +66
-50
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,14 @@ func init() {
312
312
},
313
313
"deprecationReason" : & Field {
314
314
Type : String ,
315
+ Resolve : func (p ResolveParams ) (interface {}, error ) {
316
+ if field , ok := p .Source .(* FieldDefinition ); ok {
317
+ if field .DeprecationReason != "" {
318
+ return field .DeprecationReason , nil
319
+ }
320
+ }
321
+ return nil , nil
322
+ },
315
323
},
316
324
},
317
325
})
@@ -497,6 +505,14 @@ func init() {
497
505
},
498
506
"deprecationReason" : & Field {
499
507
Type : String ,
508
+ Resolve : func (p ResolveParams ) (interface {}, error ) {
509
+ if field , ok := p .Source .(* EnumValueDefinition ); ok {
510
+ if field .DeprecationReason != "" {
511
+ return field .DeprecationReason , nil
512
+ }
513
+ }
514
+ return nil , nil
515
+ },
500
516
},
501
517
},
502
518
})
You can’t perform that action at this time.
0 commit comments