PHP Class Youshido\GraphQL\Execution\Processor

Mostra file Open project: youshido/graphql Class Usage Examples

Protected Properties

Property Type Description
$data array
$executionContext Youshido\GraphQL\Execution\Context\ExecutionContext
$maxComplexity integer
$resolveValidator Youshido\GraphQL\Validator\ResolveValidator\ResolveValidatorInterface

Public Methods

Method Description
__construct ( AbstractSchema $schema )
getExecutionContext ( ) : ExecutionContext You can access ExecutionContext to check errors and inject dependencies
getMaxComplexity ( ) : integer
getResponseData ( )
processPayload ( $payload, $variables = [], $reducers = [] )
setMaxComplexity ( integer $maxComplexity )

Protected Methods

Method Description
createResolveInfo ( Youshido\GraphQL\Field\FieldInterface $field, array $astFields )
doResolve ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue = null )
parseAndCreateRequest ( $payload, $variables = [] )
parseArgumentsValues ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast )
resolveComposite ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue )
resolveField ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue = null, $fromObject = false )
resolveList ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue )
resolveObject ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue, $fromUnion = false )
resolveQuery ( Query $query )
resolveScalar ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue )

Private Methods

Method Description
collectResult ( Youshido\GraphQL\Field\FieldInterface $field, AbstractObjectType $type, $ast, $resolvedValue )
getAlias ( Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast )
getVariableReferenceArgumentValue ( VariableReference $variableReference, AbstractType $argumentType, Request $request )
prepareArgumentValue ( $argumentValue, AbstractType $argumentType, Request $request )
prepareAstArguments ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $query, Request $request )

Method Details

__construct() public method

public __construct ( AbstractSchema $schema )
$schema Youshido\GraphQL\Schema\AbstractSchema

createResolveInfo() protected method

protected createResolveInfo ( Youshido\GraphQL\Field\FieldInterface $field, array $astFields )
$field Youshido\GraphQL\Field\FieldInterface
$astFields array

doResolve() protected method

protected doResolve ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue = null )
$field Youshido\GraphQL\Field\FieldInterface
$ast Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface

getExecutionContext() public method

You can access ExecutionContext to check errors and inject dependencies
public getExecutionContext ( ) : ExecutionContext
return Youshido\GraphQL\Execution\Context\ExecutionContext

getMaxComplexity() public method

public getMaxComplexity ( ) : integer
return integer

getResponseData() public method

public getResponseData ( )

parseAndCreateRequest() protected method

protected parseAndCreateRequest ( $payload, $variables = [] )

parseArgumentsValues() protected method

protected parseArgumentsValues ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast )
$field Youshido\GraphQL\Field\FieldInterface
$ast Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface

processPayload() public method

public processPayload ( $payload, $variables = [], $reducers = [] )

resolveComposite() protected method

protected resolveComposite ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue )
$field Youshido\GraphQL\Field\FieldInterface
$ast Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface

resolveField() protected method

protected resolveField ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue = null, $fromObject = false )
$field Youshido\GraphQL\Field\FieldInterface
$ast Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface

resolveList() protected method

protected resolveList ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue )
$field Youshido\GraphQL\Field\FieldInterface
$ast Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface

resolveObject() protected method

protected resolveObject ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue, $fromUnion = false )
$field Youshido\GraphQL\Field\FieldInterface
$ast Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface

resolveQuery() protected method

protected resolveQuery ( Query $query )
$query Youshido\GraphQL\Parser\Ast\Query

resolveScalar() protected method

protected resolveScalar ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue )
$field Youshido\GraphQL\Field\FieldInterface
$ast Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface

setMaxComplexity() public method

public setMaxComplexity ( integer $maxComplexity )
$maxComplexity integer

Property Details

$data protected_oe property

protected array $data
return array

$executionContext protected_oe property

protected ExecutionContext,Youshido\GraphQL\Execution\Context $executionContext
return Youshido\GraphQL\Execution\Context\ExecutionContext

$maxComplexity protected_oe property

protected int $maxComplexity
return integer

$resolveValidator protected_oe property

protected ResolveValidatorInterface,Youshido\GraphQL\Validator\ResolveValidator $resolveValidator
return Youshido\GraphQL\Validator\ResolveValidator\ResolveValidatorInterface