mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-04-02 20:26:09 +03:00
Reverted unneeded change in the defaultFieldResolver
This commit is contained in:
parent
c7fcd4eb48
commit
4bc9dfc6f8
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue