Documentation

TypeInfo
in package

Table of Contents

$argument  : FieldArgument|null
$defaultValueStack  : array<string|int, mixed>
$directive  : Directive|null
$enumValue  : mixed
$fieldDefStack  : array<string|int, FieldDefinition>
$inputTypeStack  : array<string|int, (\GraphQL\Type\Definition\InputType&\GraphQL\Type\Definition\Type)|null>
$parentTypeStack  : array<string|int, (\GraphQL\Type\Definition\CompositeType&\GraphQL\Type\Definition\Type)|null>
$schema  : Schema
$typeStack  : array<string|int, (\GraphQL\Type\Definition\OutputType&\GraphQL\Type\Definition\Type)|null>
__construct()  : mixed
doTypesOverlap()  : mixed
enter()  : mixed
extractTypes()  : array<string|int, Type>|null
Given root type scans through all fields to find nested types. Returns array where keys are for type name and value contains corresponding type instance.
extractTypesFromDirectives()  : array<string|int, Type>
getArgument()  : FieldArgument|null
getDefaultValue()  : mixed|null
getDirective()  : Directive|null
getEnumValue()  : mixed
getFieldDef()  : FieldDefinition|null
getInputType()  : InputType|null
getParentInputType()  : (\GraphQL\Type\Definition\Type&\GraphQL\Type\Definition\InputType)|null
getParentType()  : CompositeType|null
getType()  : OutputType|null
isEqualType()  : bool
isTypeSubTypeOf()  : mixed
leave()  : mixed
typeFromAST()  : Type|null
getFieldDefinition()  : FieldDefinition|null
Not exactly the same as the executor's definition of getFieldDef, in this statically evaluated environment we do not always have an Object type, and need to handle Interface and Union types.

Properties

$defaultValueStack

private array<string|int, mixed> $defaultValueStack

$fieldDefStack

private array<string|int, FieldDefinition> $fieldDefStack

$inputTypeStack

private array<string|int, (\GraphQL\Type\Definition\InputType&\GraphQL\Type\Definition\Type)|null> $inputTypeStack

$parentTypeStack

private array<string|int, (\GraphQL\Type\Definition\CompositeType&\GraphQL\Type\Definition\Type)|null> $parentTypeStack

$typeStack

private array<string|int, (\GraphQL\Type\Definition\OutputType&\GraphQL\Type\Definition\Type)|null> $typeStack

Methods

__construct()

public __construct(Schema $schema[, Type|null $initialType = null ]) : mixed
Parameters
$schema : Schema
$initialType : Type|null = null
Return values
mixed

enter()

public enter(Node $node) : mixed
Parameters
$node : Node
Return values
mixed

extractTypes()

Given root type scans through all fields to find nested types. Returns array where keys are for type name and value contains corresponding type instance.

public static extractTypes(Type|null $type[, array<string|int, Type>|null $typeMap = null ]) : array<string|int, Type>|null

Example output: [ 'String' => $instanceOfStringType, 'MyType' => $instanceOfMyType, ... ]

Parameters
$type : Type|null
$typeMap : array<string|int, Type>|null = null
Return values
array<string|int, Type>|null

extractTypesFromDirectives()

public static extractTypesFromDirectives(Directive $directive[, array<string|int, Type$typeMap = [] ]) : array<string|int, Type>
Parameters
$directive : Directive
$typeMap : array<string|int, Type> = []
Return values
array<string|int, Type>

getDefaultValue()

public getDefaultValue() : mixed|null
Return values
mixed|null

getEnumValue()

public getEnumValue() : mixed
Return values
mixed

getFieldDef()

public getFieldDef() : FieldDefinition|null
Return values
FieldDefinition|null

getParentInputType()

public getParentInputType() : (\GraphQL\Type\Definition\Type&\GraphQL\Type\Definition\InputType)|null
Return values
(\GraphQL\Type\Definition\Type&\GraphQL\Type\Definition\InputType)|null

isEqualType()

public static isEqualType(Type $typeA, Type $typeB) : bool
Parameters
$typeA : Type
$typeB : Type
Tags
deprecated

moved to GraphQL\Utils\TypeComparators

codeCoverageIgnore
Return values
bool

isTypeSubTypeOf()

public static isTypeSubTypeOf(Schema $schema, Type $maybeSubType, Type $superType) : mixed
Parameters
$schema : Schema
$maybeSubType : Type
$superType : Type
Tags
deprecated

moved to GraphQL\Utils\TypeComparators

codeCoverageIgnore
Return values
mixed

leave()

public leave(Node $node) : mixed
Parameters
$node : Node
Return values
mixed

getFieldDefinition()

Not exactly the same as the executor's definition of getFieldDef, in this statically evaluated environment we do not always have an Object type, and need to handle Interface and Union types.

private static getFieldDefinition(Schema $schema, Type $parentType, FieldNode $fieldNode) : FieldDefinition|null
Parameters
$schema : Schema
$parentType : Type
$fieldNode : FieldNode
Return values
FieldDefinition|null

Search results