CoroutineExecutor
in package
implements
Runtime, ExecutorImplementation
Interfaces, Classes, Traits and Enums
- Runtime
- ExecutorImplementation
Table of Contents
- $collector : Collector|null
- $contextValue : mixed|null
- $documentNode : DocumentNode
- $doResolve : callable
- $errors : array<string|int, Error>
- $fieldResolver : callable
- $operationName : string|null
- $pending : int|null
- $promiseAdapter : PromiseAdapter
- $queue : SplQueue
- $rawVariableValues : mixed|null
- $rootResult : stdClass|null
- $rootValue : mixed|null
- $schedule : SplQueue
- $schema : Schema
- $undefined : object
- $variableValues : mixed|null
- __construct() : mixed
- create() : mixed
- doExecute() : Promise
- Returns promise of {@link ExecutionResult}. Promise should always resolve, never reject.
- completeValue() : mixed
- completeValueFast() : bool
- done() : mixed
- findFieldDefinition() : mixed
- finishExecute() : ExecutionResult
- isPromise() : bool
- mergeSelectionSets() : mixed
- resolveTypeSlow() : Generator|ObjectType|Type|null
- resultToArray() : mixed
- run() : mixed
- spawn() : mixed
Properties
$collector
private
Collector|null
$collector
$contextValue
private
mixed|null
$contextValue
$documentNode
private
DocumentNode
$documentNode
$doResolve
private
callable
$doResolve
$errors
private
array<string|int, Error>
$errors
$fieldResolver
private
callable
$fieldResolver
$operationName
private
string|null
$operationName
$pending
private
int|null
$pending
$promiseAdapter
private
PromiseAdapter
$promiseAdapter
$queue
private
SplQueue
$queue
$rawVariableValues
private
mixed|null
$rawVariableValues
$rootResult
private
stdClass|null
$rootResult
$rootValue
private
mixed|null
$rootValue
$schedule
private
SplQueue
$schedule
$schema
private
Schema
$schema
$undefined
private
static object
$undefined
$variableValues
private
mixed|null
$variableValues
Methods
__construct()
public
__construct(PromiseAdapter $promiseAdapter, Schema $schema, DocumentNode $documentNode, mixed $rootValue, mixed $contextValue, mixed $rawVariableValues, string|null $operationName, callable $fieldResolver) : mixed
Parameters
- $promiseAdapter : PromiseAdapter
- $schema : Schema
- $documentNode : DocumentNode
- $rootValue : mixed
- $contextValue : mixed
- $rawVariableValues : mixed
- $operationName : string|null
- $fieldResolver : callable
Return values
mixed —create()
public
static create(PromiseAdapter $promiseAdapter, Schema $schema, DocumentNode $documentNode, mixed $rootValue, mixed $contextValue, mixed $variableValues, string|null $operationName, callable $fieldResolver) : mixed
Parameters
- $promiseAdapter : PromiseAdapter
- $schema : Schema
- $documentNode : DocumentNode
- $rootValue : mixed
- $contextValue : mixed
- $variableValues : mixed
- $operationName : string|null
- $fieldResolver : callable
Return values
mixed —doExecute()
Returns promise of {@link ExecutionResult}. Promise should always resolve, never reject.
public
doExecute() : Promise
Return values
Promise —completeValue()
private
completeValue(CoroutineContext $ctx, Type $type, mixed $value, array<string|int, string> $path, array<string|int, string>|null $nullFence) : mixed
Parameters
- $ctx : CoroutineContext
- $type : Type
- $value : mixed
- $path : array<string|int, string>
- $nullFence : array<string|int, string>|null
Return values
mixed —completeValueFast()
private
completeValueFast(CoroutineContext $ctx, Type $type, mixed $value, array<string|int, string> $path, mixed &$returnValue) : bool
Parameters
- $ctx : CoroutineContext
- $type : Type
- $value : mixed
- $path : array<string|int, string>
- $returnValue : mixed
Return values
bool —done()
private
done() : mixed
Return values
mixed —findFieldDefinition()
private
findFieldDefinition(CoroutineContext $ctx) : mixed
Parameters
- $ctx : CoroutineContext
Return values
mixed —finishExecute()
private
finishExecute(object|null $value, array<string|int, Error> $errors) : ExecutionResult
Parameters
- $value : object|null
- $errors : array<string|int, Error>
Return values
ExecutionResult —isPromise()
private
isPromise(mixed $value) : bool
Parameters
- $value : mixed
Return values
bool —mergeSelectionSets()
private
mergeSelectionSets(CoroutineContext $ctx) : mixed
Parameters
- $ctx : CoroutineContext
Return values
mixed —resolveTypeSlow()
private
resolveTypeSlow(CoroutineContext $ctx, mixed $value, InterfaceType|UnionType $abstractType) : Generator|ObjectType|Type|null
Parameters
- $ctx : CoroutineContext
- $value : mixed
- $abstractType : InterfaceType|UnionType
Return values
Generator|ObjectType|Type|null —resultToArray()
private
static resultToArray(mixed $value[, mixed $emptyObjectAsStdClass = true ]) : mixed
Parameters
- $value : mixed
- $emptyObjectAsStdClass : mixed = true
Return values
mixed —run()
private
run() : mixed
Return values
mixed —spawn()
private
spawn(CoroutineContext $ctx) : mixed
Parameters
- $ctx : CoroutineContext