public static function promiseToExecute(
        PromiseAdapter $promiseAdapter,
        Schema $schema,
        DocumentNode $documentNode,
        $rootValue = null,
        $contextValue = null,
        $variableValues = null,
        $operationName = null,
        ?callable $fieldResolver = null
    ) {
        $factory = self::$implementationFactory;

        /** @var ExecutorImplementation $executor */
        $executor = $factory(
            $promiseAdapter,
            $schema,
            $documentNode,
            $rootValue,
            $contextValue,
            $variableValues,
            $operationName,
            $fieldResolver ?: self::$defaultFieldResolver
        );

        return $executor->doExecute();
    }
public static function promiseToExecute(
        PromiseAdapter $promiseAdapter,
        Schema $schema,
        DocumentNode $documentNode,
        $rootValue = null,
        $contextValue = null,
        $variableValues = null,
        $operationName = null,
        ?callable $fieldResolver = null
    ) {
        $factory = self::$implementationFactory;

        
        $executor = $factory(
            $promiseAdapter,
            $schema,
            $documentNode,
            $rootValue,
            $contextValue,
            $variableValues,
            $operationName,
            $fieldResolver ?: self::$defaultFieldResolver
        );

        return $executor->doExecute();
    }
public static function promiseToExecute ( PromiseAdapter $ promiseAdapter , Schema $ schema , DocumentNode $ documentNode , $ rootValue = null , $ contextValue = null , $ variableValues = null , $ operationName = null , ? callable $ fieldResolver = null ) { $ factory = self :: $ implementationFactory ; /** @var ExecutorImplementation $executor */ $ executor = $ factory ( $ promiseAdapter , $ schema , $ documentNode , $ rootValue , $ contextValue , $ variableValues , $ operationName , $ fieldResolver ? : self :: $ defaultFieldResolver ) ; return $ executor -> doExecute ( ) ; }
Same as execute(), but requires promise adapter and returns a promise which is always
fulfilled with an instance of ExecutionResult and never rejected.

Useful for async PHP platforms.

@param mixed|null   $rootValue
@param mixed|null   $contextValue
@param mixed[]|null $variableValues
@param string|null  $operationName

@return Promise

@api
Same as execute () but requires promise adapter and returns a promise which is always fulfilled with an instance of ExecutionResult and never rejected .