PHP Class GraphQL\Utils\TypeInfo

Afficher le fichier Open project: webonyx/graphql-php Class Usage Examples

Méthodes publiques

Méthode Description
__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

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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

doTypesOverlap() static public méthode

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 méthode

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

getArgument() public méthode

public getArgument ( ) : FieldArgument | null
Résultat GraphQL\Type\Definition\FieldArgument | null

getDirective() public méthode

public getDirective ( ) : Directive | null
Résultat GraphQL\Type\Definition\Directive | null

getFieldDef() public méthode

public getFieldDef ( ) : FieldDefinition
Résultat GraphQL\Type\Definition\FieldDefinition

getInputType() public méthode

public getInputType ( ) : GraphQL\Type\Definition\InputType
Résultat GraphQL\Type\Definition\InputType

getParentType() public méthode

public getParentType ( ) : Type
Résultat GraphQL\Type\Definition\Type

getType() public méthode

public getType ( ) : Type
Résultat GraphQL\Type\Definition\Type

isEqualType() public static méthode

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() static public méthode

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 méthode

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

typeFromAST() public static méthode

public static typeFromAST ( Schema $schema, $inputTypeNode ) : Type
$schema GraphQL\Schema
Résultat GraphQL\Type\Definition\Type