mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-02-14 19:43:13 +03:00
Fix fatal error when GraphiQL tries to run introspection query
This commit is contained in:
parent
dab3e52242
commit
6b97439877
@ -282,25 +282,25 @@ EOD;
|
|||||||
'deprecationReason' => 'Use `locations`.',
|
'deprecationReason' => 'Use `locations`.',
|
||||||
'type' => Type::nonNull(Type::boolean()),
|
'type' => Type::nonNull(Type::boolean()),
|
||||||
'resolve' => function($d) {
|
'resolve' => function($d) {
|
||||||
return in_array(Directive::$directiveLocations['QUERY'], $d['locations']) ||
|
return in_array(Directive::$directiveLocations['QUERY'], $d->locations) ||
|
||||||
in_array(Directive::$directiveLocations['MUTATION'], $d['locations']) ||
|
in_array(Directive::$directiveLocations['MUTATION'], $d->locations) ||
|
||||||
in_array(Directive::$directiveLocations['SUBSCRIPTION'], $d['locations']);
|
in_array(Directive::$directiveLocations['SUBSCRIPTION'], $d->locations);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'onFragment' => [
|
'onFragment' => [
|
||||||
'deprecationReason' => 'Use `locations`.',
|
'deprecationReason' => 'Use `locations`.',
|
||||||
'type' => Type::nonNull(Type::boolean()),
|
'type' => Type::nonNull(Type::boolean()),
|
||||||
'resolve' => function($d) {
|
'resolve' => function($d) {
|
||||||
return in_array(Directive::$directiveLocations['FRAGMENT_SPREAD'], $d['locations']) ||
|
return in_array(Directive::$directiveLocations['FRAGMENT_SPREAD'], $d->locations) ||
|
||||||
in_array(Directive::$directiveLocations['INLINE_FRAGMENT'], $d['locations']) ||
|
in_array(Directive::$directiveLocations['INLINE_FRAGMENT'], $d->locations) ||
|
||||||
in_array(Directive::$directiveLocations['FRAGMENT_DEFINITION'], $d['locations']);
|
in_array(Directive::$directiveLocations['FRAGMENT_DEFINITION'], $d->locations);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'onField' => [
|
'onField' => [
|
||||||
'deprecationReason' => 'Use `locations`.',
|
'deprecationReason' => 'Use `locations`.',
|
||||||
'type' => Type::nonNull(Type::boolean()),
|
'type' => Type::nonNull(Type::boolean()),
|
||||||
'resolve' => function($d) {
|
'resolve' => function($d) {
|
||||||
return in_array(Directive::$directiveLocations['FIELD'], $d['locations']);
|
return in_array(Directive::$directiveLocations['FIELD'], $d->locations);
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user