Reverted unneeded change in the defaultFieldResolver

This commit is contained in:
Vladimir Razuvaev 2018-10-10 11:29:14 +02:00
parent c7fcd4eb48
commit 4bc9dfc6f8

View File

@ -6,6 +6,7 @@ namespace GraphQL\Executor;
use ArrayAccess; use ArrayAccess;
use ArrayObject; use ArrayObject;
use Closure;
use Exception; use Exception;
use GraphQL\Error\Error; use GraphQL\Error\Error;
use GraphQL\Error\InvariantViolation; 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;
} }
} }