Method | Description | |
---|---|---|
completeValueWithLocatedError ( |
This is a small wrapper around completeValue which annotates errors with location information. | |
defaultFieldResolver ( $source, $args, $context, |
If a resolve function is not given, then a default resolve behavior is used which takes the property of the source object of the same name as the field and returns it as the result, or if it's a function, returns the result of calling that function while passing along args and context. | |
defaultResolveFn ( $source, $args, $context, |
||
execute ( |
||
setDefaultFieldResolver ( callable $fn ) | Custom default resolve function | |
setDefaultResolveFn ( callable $fn ) | ||
setPromiseAdapter ( GraphQL\Executor\Promise\PromiseAdapter $promiseAdapter = null ) |
Method | Description | |
---|---|---|
buildExecutionContext ( |
Constructs a ExecutionContext object from the arguments passed to execute, which we will pass throughout the other execution methods. | |
collectFields ( |
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 ( |
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 ( |
Complete a list value by completing each item in the list with the inner type | |
completeObjectValue ( |
Complete an Object value by executing all sub-selections. | |
completeValue ( |
Implements the instructions for completeValue as defined in the "Field entries" section of the spec. | |
completeValueCatchingError ( |
This is a small wrapper around completeValue which detects and logs errors in the execution context. | |
doesFragmentConditionMatch ( |
Determines if a fragment is applicable to the given type. | |
executeFields ( |
Implements the "Evaluating selection sets" section of the spec for "read" mode. | |
executeFieldsSerially ( |
Implements the "Evaluating selection sets" section of the spec for "write" mode. | |
executeOperation ( |
Implements the "Evaluating operations" section of the spec. | |
fixResultsIfEmptyArray ( $results ) : stdClass | array | ||
getFieldDef ( |
This method looks up the field on the given type defintion. | |
getFieldEntryKey ( |
Implements the logic to compute the key of a given fields entry | |
getOperationRootType ( |
Extracts the root type of the operation from the schema. | |
inferTypeOf ( $value, $context, |
Infer type of the value using isTypeOf of corresponding AbstractType | |
resolveField ( |
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 ( |
Isolates the "ReturnOrAbrupt" behavior to not de-opt the resolveField function. Returns the result of resolveFn or the abrupt-return Error object. | |
shouldIncludeNode ( |
Determines if a field should be included based on the @include and @skip directives, where @skip has higher precedence than @include. |
public static completeValueWithLocatedError ( |
||
$exeContext | ||
$returnType | ||
$fieldNodes | ||
$info | ||
$path | ||
$result | ||
return | array | null | GraphQL\Executor\Promise\Promise |
public static defaultFieldResolver ( $source, $args, $context, |
||
$source | ||
$args | ||
$context | ||
$info | ||
return | mixed | null |
public static defaultResolveFn ( $source, $args, $context, |
||
$source | ||
$args | ||
$context | ||
$info | ||
return | mixed | null |
public static execute ( |
||
$schema | ||
$ast | ||
$rootValue | ||
$contextValue | ||
$variableValues | array | ArrayAccess | |
$operationName | null | |
return |
public static setDefaultFieldResolver ( callable $fn ) | ||
$fn | callable |
public static setDefaultResolveFn ( callable $fn ) | ||
$fn | callable |
public static setPromiseAdapter ( GraphQL\Executor\Promise\PromiseAdapter $promiseAdapter = null ) | ||
$promiseAdapter | GraphQL\Executor\Promise\PromiseAdapter |