Documentation

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

$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

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
throws
Error
Return values
Type

makeInputValues()

private makeInputValues(NodeList $values) : array<string, array<string, mixed>>
Parameters
$values : NodeList
Return values
array<string, array<string, mixed>>

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
throws
Error
Return values
CustomScalarType|EnumType|InputObjectType|InterfaceType|ObjectType|UnionType

Search results