PHP 클래스 GraphQL\Executor\Values

파일 보기 프로젝트 열기: webonyx/graphql-php 1 사용 예제들

공개 메소드들

메소드 설명
getArgumentValues ( FieldDefinition | Directive $def, FieldNode | DirectiveNode $node, $variableValues ) : array Prepares an object map of argument values given a list of argument definitions and list of argument AST nodes.
getVariableValues ( Schema $schema, VariableDefinitionNode[] $definitionNodes, array $inputs ) : array Prepares an object map of variables of the correct type based on the provided variable definitions and arbitrary input. If the input cannot be coerced to match the variable definitions, a Error will be thrown.
valueFromAST ( $valueNode, GraphQL\Type\Definition\InputType $type, null $variables = null ) : array | null | stdClass

비공개 메소드들

메소드 설명
coerceValue ( Type $type, $value ) Given a type and any value, return a runtime value coerced to match the type.
isValidPHPValue ( $value, GraphQL\Type\Definition\InputType $type ) : array Given a PHP value and a GraphQL type, determine if the value will be accepted for that type. This is primarily useful for validating the runtime values of query variables.

메소드 상세

getArgumentValues() 공개 정적인 메소드

Prepares an object map of argument values given a list of argument definitions and list of argument AST nodes.
public static getArgumentValues ( FieldDefinition | Directive $def, FieldNode | DirectiveNode $node, $variableValues ) : array
$def GraphQL\Type\Definition\FieldDefinition | GraphQL\Type\Definition\Directive
$node GraphQL\Language\AST\FieldNode | GraphQL\Language\AST\DirectiveNode
$variableValues
리턴 array

getVariableValues() 공개 정적인 메소드

Prepares an object map of variables of the correct type based on the provided variable definitions and arbitrary input. If the input cannot be coerced to match the variable definitions, a Error will be thrown.
public static getVariableValues ( Schema $schema, VariableDefinitionNode[] $definitionNodes, array $inputs ) : array
$schema GraphQL\Schema
$definitionNodes GraphQL\Language\AST\VariableDefinitionNode[]
$inputs array
리턴 array

valueFromAST() 공개 정적인 메소드

사용 중단: as of 8.0 (Moved to Utils\AST::valueFromAST)
public static valueFromAST ( $valueNode, GraphQL\Type\Definition\InputType $type, null $variables = null ) : array | null | stdClass
$valueNode
$type GraphQL\Type\Definition\InputType
$variables null
리턴 array | null | stdClass