SchemaValidationContext
Table of Contents
-
$errors
: array<string|int, mixed>
-
$inputObjectCircularRefs
: InputObjectCircularRefs
-
$schema
: Schema
-
__construct()
: mixed
-
duplicateType()
: string
-
getErrors()
: array<int, Error>
-
reportError()
: void
-
validateDirectiveDefinitions()
: void
-
validateDirectives()
: void
-
validateRootTypes()
: void
-
validateTypes()
: void
-
addError()
: void
-
getAllDirectiveArgNodes()
: array<int, InputValueDefinitionNode>
-
getAllFieldArgNodes()
: array<int, InputValueDefinitionNode>
-
getAllFieldNodes()
: array<int, FieldDefinitionNode>
-
getAllImplementsInterfaceNodes()
: array<int, NamedTypeNode>
-
getAllNodes()
: array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\SchemaDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\SchemaExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\ObjectTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\ObjectTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InterfaceTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InterfaceTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\UnionTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\UnionTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\EnumTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\EnumTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InputObjectTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InputObjectTypeExtensionNode>|array<int, DirectiveDefinitionNode>
-
getDirectiveArgTypeNode()
: NamedTypeNode|ListTypeNode|NonNullTypeNode|null
-
getDirectives()
: NodeList<string|int, DirectiveNode>
-
getFieldArgNode()
: InputValueDefinitionNode|null
-
getFieldArgTypeNode()
: NamedTypeNode|ListTypeNode|NonNullTypeNode|null
-
getFieldNode()
: FieldDefinitionNode|null
-
getFieldTypeNode()
: NamedTypeNode|ListTypeNode|NonNullTypeNode|null
-
getImplementsInterfaceNode()
: NamedTypeNode|null
-
getUnionMemberTypeNodes()
: array<int, NamedTypeNode>
-
validateDirectivesAtLocation()
: void
-
validateEnumValues()
: void
-
validateFields()
: void
-
validateInputFields()
: void
-
validateInterfaces()
: void
-
validateName()
: void
-
validateTypeImplementsAncestors()
: void
-
validateTypeImplementsInterface()
: void
-
validateTypeIsSingleton()
: void
-
validateUnionMembers()
: void
__construct()
public
__construct(Schema $schema) : mixed
Parameters
-
$schema
: Schema
-
Return values
mixed
—
duplicateType()
public
static duplicateType(Schema $schema, string $path, string $name) : string
Parameters
-
$schema
: Schema
-
-
$path
: string
-
-
$name
: string
-
Return values
string
—
getErrors()
public
getErrors() : array<int, Error>
Return values
array<int, Error>
—
reportError()
public
reportError(string $message[, array<string|int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\Node|null>|Node|null $nodes = null ]) : void
Parameters
-
$message
: string
-
-
$nodes
: array<string|int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\Node|null>|Node|null
= null
-
Return values
void
—
validateDirectiveDefinitions()
public
validateDirectiveDefinitions() : void
-
throws
-
InvariantViolation
Return values
void
—
validateDirectives()
public
validateDirectives() : void
-
throws
-
InvariantViolation
Return values
void
—
validateRootTypes()
public
validateRootTypes() : void
Return values
void
—
validateTypes()
public
validateTypes() : void
-
throws
-
InvariantViolation
Return values
void
—
addError()
private
addError(Error $error) : void
Parameters
-
$error
: Error
-
Return values
void
—
getAllDirectiveArgNodes()
private
getAllDirectiveArgNodes(Directive $directive, string $argName) : array<int, InputValueDefinitionNode>
Parameters
-
$directive
: Directive
-
-
$argName
: string
-
Return values
array<int, InputValueDefinitionNode>
—
getAllFieldArgNodes()
private
getAllFieldArgNodes(ObjectType|InterfaceType $type, string $fieldName, string $argName) : array<int, InputValueDefinitionNode>
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$fieldName
: string
-
-
$argName
: string
-
Return values
array<int, InputValueDefinitionNode>
—
getAllFieldNodes()
private
getAllFieldNodes(ObjectType|InterfaceType $type, string $fieldName) : array<int, FieldDefinitionNode>
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$fieldName
: string
-
Return values
array<int, FieldDefinitionNode>
—
getAllImplementsInterfaceNodes()
private
getAllImplementsInterfaceNodes(ObjectType|InterfaceType $type, Type|NamedType $shouldBeInterface) : array<int, NamedTypeNode>
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$shouldBeInterface
: Type|NamedType
-
Return values
array<int, NamedTypeNode>
—
getAllNodes()
private
getAllNodes(Schema|ObjectType|InterfaceType|UnionType|EnumType|InputObjectType|Directive $obj) : array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\SchemaDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\SchemaExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\ObjectTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\ObjectTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InterfaceTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InterfaceTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\UnionTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\UnionTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\EnumTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\EnumTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InputObjectTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InputObjectTypeExtensionNode>|array<int, DirectiveDefinitionNode>
Parameters
-
$obj
: Schema|ObjectType|InterfaceType|UnionType|EnumType|InputObjectType|Directive
-
Return values
array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\SchemaDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\SchemaExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\ObjectTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\ObjectTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InterfaceTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InterfaceTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\UnionTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\UnionTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\EnumTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\EnumTypeExtensionNode>|array<int, \Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InputObjectTypeDefinitionNode|\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\InputObjectTypeExtensionNode>|array<int, DirectiveDefinitionNode>
—
getDirectiveArgTypeNode()
private
getDirectiveArgTypeNode(Directive $directive, string $argName) : NamedTypeNode|ListTypeNode|NonNullTypeNode|null
Parameters
-
$directive
: Directive
-
-
$argName
: string
-
Return values
NamedTypeNode|ListTypeNode|NonNullTypeNode|null
—
getDirectives()
private
getDirectives(Schema|(\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType) $object) : NodeList<string|int, DirectiveNode>
Parameters
-
$object
: Schema|(\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType)
-
Return values
NodeList<string|int, DirectiveNode>
—
getFieldArgNode()
private
getFieldArgNode(ObjectType|InterfaceType $type, string $fieldName, string $argName) : InputValueDefinitionNode|null
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$fieldName
: string
-
-
$argName
: string
-
Return values
InputValueDefinitionNode|null
—
getFieldArgTypeNode()
private
getFieldArgTypeNode(ObjectType|InterfaceType $type, string $fieldName, string $argName) : NamedTypeNode|ListTypeNode|NonNullTypeNode|null
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$fieldName
: string
-
-
$argName
: string
-
Return values
NamedTypeNode|ListTypeNode|NonNullTypeNode|null
—
getFieldNode()
private
getFieldNode(ObjectType|InterfaceType $type, string $fieldName) : FieldDefinitionNode|null
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$fieldName
: string
-
Return values
FieldDefinitionNode|null
—
getFieldTypeNode()
private
getFieldTypeNode(ObjectType|InterfaceType $type, string $fieldName) : NamedTypeNode|ListTypeNode|NonNullTypeNode|null
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$fieldName
: string
-
Return values
NamedTypeNode|ListTypeNode|NonNullTypeNode|null
—
getImplementsInterfaceNode()
private
getImplementsInterfaceNode(ObjectType|InterfaceType $type, Type|NamedType $shouldBeInterface) : NamedTypeNode|null
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$shouldBeInterface
: Type|NamedType
-
Return values
NamedTypeNode|null
—
getUnionMemberTypeNodes()
private
getUnionMemberTypeNodes(UnionType $union, string $typeName) : array<int, NamedTypeNode>
Parameters
-
$union
: UnionType
-
-
$typeName
: string
-
Return values
array<int, NamedTypeNode>
—
validateDirectivesAtLocation()
private
validateDirectivesAtLocation(NodeList<string|int, DirectiveNode> $directives, string $location) : void
Parameters
-
$directives
: NodeList<string|int, DirectiveNode>
-
-
$location
: string
-
-
throws
-
InvariantViolation
Return values
void
—
validateEnumValues()
private
validateEnumValues(EnumType $enumType) : void
Parameters
-
$enumType
: EnumType
-
-
throws
-
InvariantViolation
Return values
void
—
validateFields()
private
validateFields(ObjectType|InterfaceType $type) : void
Parameters
-
$type
: ObjectType|InterfaceType
-
-
throws
-
InvariantViolation
Return values
void
—
private
validateInputFields(InputObjectType $inputObj) : void
Parameters
-
$inputObj
: InputObjectType
-
-
throws
-
InvariantViolation
Return values
void
—
validateInterfaces()
private
validateInterfaces(ObjectType|InterfaceType $type) : void
Parameters
-
$type
: ObjectType|InterfaceType
-
-
throws
-
InvariantViolation
Return values
void
—
validateName()
private
validateName((\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType)|Directive|FieldDefinition|EnumValueDefinition|InputObjectField|Argument $object) : void
Parameters
-
$object
: (\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType)|Directive|FieldDefinition|EnumValueDefinition|InputObjectField|Argument
-
Return values
void
—
validateTypeImplementsAncestors()
private
validateTypeImplementsAncestors(ObjectType|InterfaceType $type, InterfaceType $iface) : void
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$iface
: InterfaceType
-
Return values
void
—
validateTypeImplementsInterface()
private
validateTypeImplementsInterface(ObjectType|InterfaceType $type, InterfaceType $iface) : void
Parameters
-
$type
: ObjectType|InterfaceType
-
-
$iface
: InterfaceType
-
-
throws
-
InvariantViolation
Return values
void
—
validateTypeIsSingleton()
private
validateTypeIsSingleton(Type $type, string $path) : void
Parameters
-
$type
: Type
-
-
$path
: string
-
-
throws
-
InvariantViolation
Return values
void
—
validateUnionMembers()
private
validateUnionMembers(UnionType $union) : void
Parameters
-
$union
: UnionType
-
-
throws
-
InvariantViolation
Return values
void
—