ASTDefinitionBuilder
in package
Table of Contents
- $cache : array<string, Type>
- $options : array<string, bool>
- $resolveType : callable
- $typeConfigDecorator : callable
- $typeDefinitionsMap : array<string, \GraphQL\Language\AST\Node&\GraphQL\Language\AST\TypeDefinitionNode>
- __construct() : mixed
- code sniffer doesn't understand this syntax. Pr with a fix here: waiting on https://github.com/squizlabs/PHP_CodeSniffer/pull/2919 phpcs:disable Squiz.Commenting.FunctionComment.SpacingAfterParamType
- buildDirective() : Directive
- buildEnumValue() : array<string, mixed>
- buildField() : array<string, mixed>
- buildInputField() : array<string, mixed>
- buildType() : Type
- buildWrappedType() : Type
- getDeprecationReason() : string|null
- Given a collection of directives, returns the string value for the deprecation reason.
- getDescription() : string|null
- Given an ast node, returns its string description.
- getLeadingCommentBlock() : string|null
- internalBuildType() : Type
- makeEnumDef() : EnumType
- makeFieldDefMap() : array<string, array<string, mixed>>
- makeImplementedInterfaces() : array<int, Type>
- makeInputObjectDef() : InputObjectType
- makeInputValues() : array<string, array<string, mixed>>
- makeInterfaceDef() : InterfaceType
- makeScalarDef() : CustomScalarType
- makeSchemaDef() : CustomScalarType|EnumType|InputObjectType|InterfaceType|ObjectType|UnionType
- makeSchemaDefFromConfig() : CustomScalarType|EnumType|InputObjectType|InterfaceType|ObjectType|UnionType
- makeTypeDef() : ObjectType
- makeUnionDef() : UnionType
Properties
$cache
private
array<string, Type>
$cache
$options
private
array<string, bool>
$options
$resolveType
private
callable
$resolveType
$typeConfigDecorator
private
callable
$typeConfigDecorator
$typeDefinitionsMap
private
array<string, \GraphQL\Language\AST\Node&\GraphQL\Language\AST\TypeDefinitionNode>
$typeDefinitionsMap
Methods
__construct()
code sniffer doesn't understand this syntax. Pr with a fix here: waiting on https://github.com/squizlabs/PHP_CodeSniffer/pull/2919 phpcs:disable Squiz.Commenting.FunctionComment.SpacingAfterParamType
public
__construct(array<string, \GraphQL\Language\AST\Node&\GraphQL\Language\AST\TypeDefinitionNode> $typeDefinitionsMap, array<string, bool> $options, callable $resolveType[, callable|null $typeConfigDecorator = null ]) : mixed
Parameters
- $typeDefinitionsMap : array<string, \GraphQL\Language\AST\Node&\GraphQL\Language\AST\TypeDefinitionNode>
- $options : array<string, bool>
- $resolveType : callable
- $typeConfigDecorator : callable|null = null
Return values
mixed —buildDirective()
public
buildDirective(DirectiveDefinitionNode $directiveNode) : Directive
Parameters
- $directiveNode : DirectiveDefinitionNode
Return values
Directive —buildEnumValue()
public
buildEnumValue(EnumValueDefinitionNode $value) : array<string, mixed>
Parameters
- $value : EnumValueDefinitionNode
Return values
array<string, mixed> —buildField()
public
buildField(FieldDefinitionNode $field) : array<string, mixed>
Parameters
- $field : FieldDefinitionNode
Return values
array<string, mixed> —buildInputField()
public
buildInputField(InputValueDefinitionNode $value) : array<string, mixed>
Parameters
- $value : InputValueDefinitionNode
Return values
array<string, mixed> —buildType()
public
buildType(mixed $ref) : Type
Parameters
- $ref : mixed
Return values
Type —buildWrappedType()
private
buildWrappedType(TypeNode $typeNode) : Type
Parameters
- $typeNode : TypeNode
Return values
Type —getDeprecationReason()
Given a collection of directives, returns the string value for the deprecation reason.
private
getDeprecationReason(EnumValueDefinitionNode|FieldDefinitionNode $node) : string|null
Parameters
Return values
string|null —getDescription()
Given an ast node, returns its string description.
private
getDescription(Node $node) : string|null
Parameters
- $node : Node
Return values
string|null —getLeadingCommentBlock()
private
getLeadingCommentBlock(Node $node) : string|null
Parameters
- $node : Node
Return values
string|null —internalBuildType()
private
internalBuildType(string $typeName[, Node|null $typeNode = null ]) : Type
Parameters
- $typeName : string
- $typeNode : Node|null = null
Tags
Return values
Type —makeEnumDef()
private
makeEnumDef(EnumTypeDefinitionNode $def) : EnumType
Parameters
- $def : EnumTypeDefinitionNode
Return values
EnumType —makeFieldDefMap()
private
makeFieldDefMap(ObjectTypeDefinitionNode|InterfaceTypeDefinitionNode $def) : array<string, array<string, mixed>>
Parameters
Return values
array<string, array<string, mixed>> —makeImplementedInterfaces()
private
makeImplementedInterfaces(ObjectTypeDefinitionNode|InterfaceTypeDefinitionNode $def) : array<int, Type>
Parameters
Return values
array<int, Type> —makeInputObjectDef()
private
makeInputObjectDef(InputObjectTypeDefinitionNode $def) : InputObjectType
Parameters
Return values
InputObjectType —makeInputValues()
private
makeInputValues(NodeList $values) : array<string, array<string, mixed>>
Parameters
- $values : NodeList
Return values
array<string, array<string, mixed>> —makeInterfaceDef()
private
makeInterfaceDef(InterfaceTypeDefinitionNode $def) : InterfaceType
Parameters
- $def : InterfaceTypeDefinitionNode
Return values
InterfaceType —makeScalarDef()
private
makeScalarDef(ScalarTypeDefinitionNode $def) : CustomScalarType
Parameters
- $def : ScalarTypeDefinitionNode
Return values
CustomScalarType —makeSchemaDef()
private
makeSchemaDef(ObjectTypeDefinitionNode|InterfaceTypeDefinitionNode|EnumTypeDefinitionNode|ScalarTypeDefinitionNode|InputObjectTypeDefinitionNode|UnionTypeDefinitionNode $def) : CustomScalarType|EnumType|InputObjectType|InterfaceType|ObjectType|UnionType
Parameters
- $def : ObjectTypeDefinitionNode|InterfaceTypeDefinitionNode|EnumTypeDefinitionNode|ScalarTypeDefinitionNode|InputObjectTypeDefinitionNode|UnionTypeDefinitionNode
Tags
Return values
CustomScalarType|EnumType|InputObjectType|InterfaceType|ObjectType|UnionType —makeSchemaDefFromConfig()
private
makeSchemaDefFromConfig(Node $def, array<string, mixed> $config) : CustomScalarType|EnumType|InputObjectType|InterfaceType|ObjectType|UnionType
Parameters
- $def : Node
- $config : array<string, mixed>
Tags
Return values
CustomScalarType|EnumType|InputObjectType|InterfaceType|ObjectType|UnionType —makeTypeDef()
private
makeTypeDef(ObjectTypeDefinitionNode $def) : ObjectType
Parameters
- $def : ObjectTypeDefinitionNode
Return values
ObjectType —makeUnionDef()
private
makeUnionDef(UnionTypeDefinitionNode $def) : UnionType
Parameters
- $def : UnionTypeDefinitionNode