mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-04-02 20:26:09 +03:00
Merge pull request #51 from geshido/master
Fix fatal error with deprecated directive fields in introspection query
This commit is contained in:
commit
f91cbf3409
1 changed files with 7 additions and 7 deletions
|
@ -282,25 +282,25 @@ EOD;
|
|||
'deprecationReason' => 'Use `locations`.',
|
||||
'type' => Type::nonNull(Type::boolean()),
|
||||
'resolve' => function($d) {
|
||||
return in_array(Directive::$directiveLocations['QUERY'], $d['locations']) ||
|
||||
in_array(Directive::$directiveLocations['MUTATION'], $d['locations']) ||
|
||||
in_array(Directive::$directiveLocations['SUBSCRIPTION'], $d['locations']);
|
||||
return in_array(Directive::$directiveLocations['QUERY'], $d->locations) ||
|
||||
in_array(Directive::$directiveLocations['MUTATION'], $d->locations) ||
|
||||
in_array(Directive::$directiveLocations['SUBSCRIPTION'], $d->locations);
|
||||
}
|
||||
],
|
||||
'onFragment' => [
|
||||
'deprecationReason' => 'Use `locations`.',
|
||||
'type' => Type::nonNull(Type::boolean()),
|
||||
'resolve' => function($d) {
|
||||
return in_array(Directive::$directiveLocations['FRAGMENT_SPREAD'], $d['locations']) ||
|
||||
in_array(Directive::$directiveLocations['INLINE_FRAGMENT'], $d['locations']) ||
|
||||
in_array(Directive::$directiveLocations['FRAGMENT_DEFINITION'], $d['locations']);
|
||||
return in_array(Directive::$directiveLocations['FRAGMENT_SPREAD'], $d->locations) ||
|
||||
in_array(Directive::$directiveLocations['INLINE_FRAGMENT'], $d->locations) ||
|
||||
in_array(Directive::$directiveLocations['FRAGMENT_DEFINITION'], $d->locations);
|
||||
}
|
||||
],
|
||||
'onField' => [
|
||||
'deprecationReason' => 'Use `locations`.',
|
||||
'type' => Type::nonNull(Type::boolean()),
|
||||
'resolve' => function($d) {
|
||||
return in_array(Directive::$directiveLocations['FIELD'], $d['locations']);
|
||||
return in_array(Directive::$directiveLocations['FIELD'], $d->locations);
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
Loading…
Add table
Reference in a new issue