GraphQL\Executor\Executor::executeOperation PHP Method

executeOperation() private static method

Implements the "Evaluating operations" section of the spec.
private static executeOperation ( ExecutionContext $exeContext, OperationDefinitionNode $operation, $rootValue ) : GraphQL\Executor\Promise\Promise | stdClass | array
$exeContext ExecutionContext
$operation GraphQL\Language\AST\OperationDefinitionNode
$rootValue
return GraphQL\Executor\Promise\Promise | stdClass | array
    private static function executeOperation(ExecutionContext $exeContext, OperationDefinitionNode $operation, $rootValue)
    {
        $type = self::getOperationRootType($exeContext->schema, $operation);
        $fields = self::collectFields($exeContext, $type, $operation->selectionSet, new \ArrayObject(), new \ArrayObject());
        $path = [];
        if ($operation->operation === 'mutation') {
            return self::executeFieldsSerially($exeContext, $type, $rootValue, $path, $fields);
        }
        return self::executeFields($exeContext, $type, $rootValue, $path, $fields);
    }