Méthode |
Description |
|
buildExecutionContext ( Schema $schema, DocumentNode $documentNode, $rootValue, $contextValue, $rawVariableValues, string $operationName = null ) : ExecutionContext |
Constructs a ExecutionContext object from the arguments passed to
execute, which we will pass throughout the other execution methods. |
|
collectFields ( ExecutionContext $exeContext, ObjectType $runtimeType, SelectionSetNode $selectionSet, $fields, $visitedFragmentNames ) : ArrayObject |
Given a selectionSet, adds all of the fields in that selection to
the passed in map of fields, and returns it at the end. |
|
completeAbstractValue ( ExecutionContext $exeContext, GraphQL\Type\Definition\AbstractType $returnType, $fieldNodes, ResolveInfo $info, array $path, &$result ) : mixed |
Complete a value of an abstract type by determining the runtime object type
of that value, then complete the value for that type. |
|
completeLeafValue ( GraphQL\Type\Definition\LeafType $returnType, &$result ) : mixed |
Complete a Scalar or Enum by serializing to a valid value, returning
null if serialization is not possible. |
|
completeListValue ( ExecutionContext $exeContext, ListOfType $returnType, $fieldNodes, ResolveInfo $info, array $path, &$result ) : array | GraphQL\Executor\Promise\Promise |
Complete a list value by completing each item in the list with the
inner type |
|
completeObjectValue ( ExecutionContext $exeContext, ObjectType $returnType, $fieldNodes, ResolveInfo $info, array $path, &$result ) : array | GraphQL\Executor\Promise\Promise | stdClass |
Complete an Object value by executing all sub-selections. |
|
completeValue ( ExecutionContext $exeContext, Type $returnType, FieldNode[] $fieldNodes, ResolveInfo $info, array $path, &$result ) : array | null | GraphQL\Executor\Promise\Promise |
Implements the instructions for completeValue as defined in the
"Field entries" section of the spec. |
|
completeValueCatchingError ( ExecutionContext $exeContext, Type $returnType, $fieldNodes, ResolveInfo $info, $path, $result ) : array | null | GraphQL\Executor\Promise\Promise |
This is a small wrapper around completeValue which detects and logs errors
in the execution context. |
|
doesFragmentConditionMatch ( ExecutionContext $exeContext, $fragment, ObjectType $type ) : boolean |
Determines if a fragment is applicable to the given type. |
|
executeFields ( ExecutionContext $exeContext, ObjectType $parentType, $source, $path, $fields ) : GraphQL\Executor\Promise\Promise | stdClass | array |
Implements the "Evaluating selection sets" section of the spec
for "read" mode. |
|
executeFieldsSerially ( ExecutionContext $exeContext, ObjectType $parentType, $sourceValue, $path, $fields ) : GraphQL\Executor\Promise\Promise | stdClass | array |
Implements the "Evaluating selection sets" section of the spec
for "write" mode. |
|
executeOperation ( ExecutionContext $exeContext, OperationDefinitionNode $operation, $rootValue ) : GraphQL\Executor\Promise\Promise | stdClass | array |
Implements the "Evaluating operations" section of the spec. |
|
fixResultsIfEmptyArray ( $results ) : stdClass | array |
|
|
getFieldDef ( Schema $schema, ObjectType $parentType, $fieldName ) : FieldDefinition |
This method looks up the field on the given type defintion. |
|
getFieldEntryKey ( FieldNode $node ) : string |
Implements the logic to compute the key of a given fields entry |
|
getOperationRootType ( Schema $schema, OperationDefinitionNode $operation ) : ObjectType |
Extracts the root type of the operation from the schema. |
|
inferTypeOf ( $value, $context, ResolveInfo $info, GraphQL\Type\Definition\AbstractType $abstractType ) : ObjectType | null |
Infer type of the value using isTypeOf of corresponding AbstractType |
|
resolveField ( ExecutionContext $exeContext, ObjectType $parentType, $source, $fieldNodes, $path ) : array | Exception | mixed | null |
Resolves the field on the given source object. In particular, this
figures out the value that the field returns by calling its resolve function,
then calls completeValue to complete promises, serialize scalars, or execute
the sub-selection-set for objects. |
|
resolveOrError ( ExecutionContext $exeContext, FieldDefinition $fieldDef, FieldNode $fieldNode, callable $resolveFn, mixed $source, mixed $context, ResolveInfo $info ) : Exception | mixed |
Isolates the "ReturnOrAbrupt" behavior to not de-opt the resolveField
function. Returns the result of resolveFn or the abrupt-return Error object. |
|
shouldIncludeNode ( ExecutionContext $exeContext, $directives ) : boolean |
Determines if a field should be included based on the @include and @skip
directives, where @skip has higher precedence than @include. |
|