PossibleFragmentSpreads
extends ValidationRule
in package
Table of Contents
- $name : string
- getName() : string
- getSDLVisitor() : array<string|int, mixed>
- Returns structure suitable for @see \Automattic\WooCommerce\Vendor\GraphQL\Language\Visitor.
- getVisitor() : array<string|int, mixed>
- Returns structure suitable for @see \Automattic\WooCommerce\Vendor\GraphQL\Language\Visitor.
- typeIncompatibleAnonSpreadMessage() : string
- typeIncompatibleSpreadMessage() : string
- doTypesOverlap() : bool
- getFragmentType() : (\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\CompositeType&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type)|null
Properties
$name
protected
string
$name
Methods
getName()
public
getName() : string
Return values
string —getSDLVisitor()
Returns structure suitable for @see \Automattic\WooCommerce\Vendor\GraphQL\Language\Visitor.
public
getSDLVisitor(SDLValidationContext $context) : array<string|int, mixed>
Parameters
- $context : SDLValidationContext
Tags
Return values
array<string|int, mixed> —getVisitor()
Returns structure suitable for @see \Automattic\WooCommerce\Vendor\GraphQL\Language\Visitor.
public
getVisitor(QueryValidationContext $context) : array<string|int, mixed>
Parameters
- $context : QueryValidationContext
Return values
array<string|int, mixed> —typeIncompatibleAnonSpreadMessage()
public
static typeIncompatibleAnonSpreadMessage(string $parentType, string $fragType) : string
Parameters
- $parentType : string
- $fragType : string
Return values
string —typeIncompatibleSpreadMessage()
public
static typeIncompatibleSpreadMessage(string $fragName, string $parentType, string $fragType) : string
Parameters
- $fragName : string
- $parentType : string
- $fragType : string
Return values
string —doTypesOverlap()
protected
doTypesOverlap(Schema $schema, CompositeType|Type $fragType, CompositeType|Type $parentType) : bool
Parameters
- $schema : Schema
- $fragType : CompositeType|Type
- $parentType : CompositeType|Type
Tags
Return values
bool —getFragmentType()
protected
getFragmentType(QueryValidationContext $context, string $name) : (\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\CompositeType&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type)|null
Parameters
- $context : QueryValidationContext
- $name : string
