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
$argument
private
FieldArgument|null
$argument
$defaultValueStack
private
array<string|int, mixed>
$defaultValueStack
$directive
private
Directive|null
$directive
$enumValue
private
mixed
$enumValue
$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
$schema
private
Schema
$schema
$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 —doTypesOverlap()
public
static doTypesOverlap(Schema $schema, CompositeType $typeA, CompositeType $typeB) : mixed
Parameters
- $schema : Schema
- $typeA : CompositeType
- $typeB : CompositeType
Tags
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
Return values
array<string|int, Type>|null —extractTypesFromDirectives()
public
static extractTypesFromDirectives(Directive $directive[, array<string|int, Type> $typeMap = [] ]) : array<string|int, Type>
Parameters
Return values
array<string|int, Type> —getArgument()
public
getArgument() : FieldArgument|null
Return values
FieldArgument|null —getDefaultValue()
public
getDefaultValue() : mixed|null
Return values
mixed|null —getDirective()
public
getDirective() : Directive|null
Return values
Directive|null —getEnumValue()
public
getEnumValue() : mixed
Return values
mixed —getFieldDef()
public
getFieldDef() : FieldDefinition|null
Return values
FieldDefinition|null —getInputType()
public
getInputType() : InputType|null
Return values
InputType|null —getParentInputType()
public
getParentInputType() : (\GraphQL\Type\Definition\Type&\GraphQL\Type\Definition\InputType)|null
Return values
(\GraphQL\Type\Definition\Type&\GraphQL\Type\Definition\InputType)|null —getParentType()
public
getParentType() : CompositeType|null
Return values
CompositeType|null —getType()
public
getType() : OutputType|null
Return values
OutputType|null —isEqualType()
public
static isEqualType(Type $typeA, Type $typeB) : bool
Parameters
Tags
Return values
bool —isTypeSubTypeOf()
public
static isTypeSubTypeOf(Schema $schema, Type $maybeSubType, Type $superType) : mixed
Parameters
Tags
Return values
mixed —leave()
public
leave(Node $node) : mixed
Parameters
- $node : Node
Return values
mixed —typeFromAST()
public
static typeFromAST(Schema $schema, NamedTypeNode|ListTypeNode|NonNullTypeNode $inputTypeNode) : Type|null
Parameters
- $schema : Schema
- $inputTypeNode : NamedTypeNode|ListTypeNode|NonNullTypeNode
Tags
Return values
Type|null —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