PHP Класс GraphQL\Utils\TypeInfo

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Schema $schema ) TypeInfo constructor.
doTypesOverlap ( Schema $schema, GraphQL\Type\Definition\CompositeType $typeA, GraphQL\Type\Definition\CompositeType $typeB ) Provided two composite types, determine if they "overlap". Two composite types overlap when the Sets of possible concrete types for each intersect.
enter ( Node $node )
getArgument ( ) : FieldArgument | null
getDirective ( ) : Directive | null
getFieldDef ( ) : FieldDefinition
getInputType ( ) : GraphQL\Type\Definition\InputType
getParentType ( ) : Type
getType ( ) : Type
isEqualType ( Type $typeA, Type $typeB ) Provided two types, return true if the types are equal (invariant).
isTypeSubTypeOf ( Schema $schema, Type $maybeSubType, Type $superType ) Provided a type and a super type, return true if the first type is either equal or a subset of the second super type (covariant).
leave ( Node $node )
typeFromAST ( Schema $schema, $inputTypeNode ) : Type

Приватные методы

Метод Описание
getFieldDefinition ( Schema $schema, Type $parentType, FieldNode $fieldNode ) : FieldDefinition 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.

Описание методов

__construct() публичный Метод

TypeInfo constructor.
public __construct ( Schema $schema )
$schema GraphQL\Schema

doTypesOverlap() статический публичный Метод

This is often used to determine if a fragment of a given type could possibly be visited in a context of another type. This function is commutative.
static public doTypesOverlap ( Schema $schema, GraphQL\Type\Definition\CompositeType $typeA, GraphQL\Type\Definition\CompositeType $typeB )
$schema GraphQL\Schema
$typeA GraphQL\Type\Definition\CompositeType
$typeB GraphQL\Type\Definition\CompositeType

enter() публичный Метод

public enter ( Node $node )
$node GraphQL\Language\AST\Node

getArgument() публичный Метод

public getArgument ( ) : FieldArgument | null
Результат GraphQL\Type\Definition\FieldArgument | null

getDirective() публичный Метод

public getDirective ( ) : Directive | null
Результат GraphQL\Type\Definition\Directive | null

getFieldDef() публичный Метод

public getFieldDef ( ) : FieldDefinition
Результат GraphQL\Type\Definition\FieldDefinition

getInputType() публичный Метод

public getInputType ( ) : GraphQL\Type\Definition\InputType
Результат GraphQL\Type\Definition\InputType

getParentType() публичный Метод

public getParentType ( ) : Type
Результат GraphQL\Type\Definition\Type

getType() публичный Метод

public getType ( ) : Type
Результат GraphQL\Type\Definition\Type

isEqualType() публичный статический Метод

Provided two types, return true if the types are equal (invariant).
public static isEqualType ( Type $typeA, Type $typeB )
$typeA GraphQL\Type\Definition\Type
$typeB GraphQL\Type\Definition\Type

isTypeSubTypeOf() статический публичный Метод

Provided a type and a super type, return true if the first type is either equal or a subset of the second super type (covariant).
static public isTypeSubTypeOf ( Schema $schema, Type $maybeSubType, Type $superType )
$schema GraphQL\Schema
$maybeSubType GraphQL\Type\Definition\Type
$superType GraphQL\Type\Definition\Type

leave() публичный Метод

public leave ( Node $node )
$node GraphQL\Language\AST\Node

typeFromAST() публичный статический Метод

public static typeFromAST ( Schema $schema, $inputTypeNode ) : Type
$schema GraphQL\Schema
Результат GraphQL\Type\Definition\Type