mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-24 22:06:04 +03:00
Reverted unneeded change in the defaultFieldResolver
This commit is contained in:
parent
c7fcd4eb48
commit
4bc9dfc6f8
@ -6,6 +6,7 @@ namespace GraphQL\Executor;
|
||||
|
||||
use ArrayAccess;
|
||||
use ArrayObject;
|
||||
use Closure;
|
||||
use Exception;
|
||||
use GraphQL\Error\Error;
|
||||
use GraphQL\Error\InvariantViolation;
|
||||
@ -1523,6 +1524,7 @@ class Executor
|
||||
}
|
||||
}
|
||||
|
||||
return is_callable($property) ? $property($source, $args, $context, $info) : $property;
|
||||
// Using instanceof vs is_callable() because it is 2-10 times faster
|
||||
return $property instanceof Closure ? $property($source, $args, $context, $info) : $property;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user