InterfaceType
extends Type
in package
implements
AbstractType, OutputType, CompositeType, NullableType, HasFieldsType, NamedType, ImplementingType
Uses
HasFieldsTypeImplementation, NamedTypeImplementation, ImplementingTypeImplementation
Registry of built-in Automattic\WooCommerce\Vendor\GraphQL types and base class for all other types.
Tags
Interfaces, Classes and Traits
- AbstractType
- OutputType
- CompositeType
- NullableType
- HasFieldsType
- NamedType
- export type NamedType = | ScalarType | ObjectType | InterfaceType | UnionType | EnumType | InputObjectType;.
- ImplementingType
- export type GraphQLImplementingType = GraphQLObjectType | GraphQLInterfaceType;.
Table of Contents
- BOOLEAN = 'Boolean'
- BUILT_IN_SCALAR_NAMES = [self::INT, self::FLOAT, self::STRING, self::BOOLEAN, self::ID]
- BUILT_IN_TYPE_NAMES = [...self::BUILT_IN_SCALAR_NAMES, ...AutomatticWooCommerceVendorGraphQLTypeIntrospection::TYPE_NAMES]
- Names of all built-in types: built-in scalars and introspection types.
- FLOAT = 'Float'
- ID = 'ID'
- INT = 'Int'
- STANDARD_TYPE_NAMES = self::BUILT_IN_SCALAR_NAMES
- STRING = 'String'
- $astNode : InterfaceTypeDefinitionNode|null
- $config : array<string|int, mixed>
- $description : string|null
- $extensionASTNodes : array<string|int, mixed>
- $name : string
- $builtInScalars : array<string|int, mixed>|null
- $builtInTypes : array<string|int, mixed>|null
- $fields : array<string|int, mixed>
- Lazily initialized.
- $interfaces : array<string|int, mixed>
- Lazily initialized.
- __construct() : mixed
- __toString() : string
- assertInterfaceType() : self
- assertValid() : void
- astNode() : (\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\Node&\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\TypeDefinitionNode)|null
- boolean() : ScalarType
- Returns the built-in Boolean scalar type.
- builtInScalars() : array<string, ScalarType>
- Returns all built-in scalar types.
- builtInTypes() : array<string, \Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType>
- Returns all built-in types: built-in scalars and introspection types.
- description() : string|null
- extensionASTNodes() : array<string|int, InterfaceTypeExtensionNode>
- findField() : FieldDefinition|null
- float() : ScalarType
- Returns the built-in Float scalar type.
- getField() : FieldDefinition
- getFieldNames() : array<string|int, mixed>
- getFields() : array<string, FieldDefinition>
- getInterfaces() : array<int, InterfaceType>
- getNamedType() : (\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType)|null
- Returns the underlying named type of the given type.
- getNullableType() : Type|NullableType
- Unwraps a potentially non-null type to return the underlying nullable type.
- getStandardTypes() : array<string, ScalarType>
- Returns all built-in scalar types.
- getVisibleFields() : array<string, FieldDefinition>
- hasField() : bool
- id() : ScalarType
- Returns the built-in ID scalar type.
- implementsInterface() : bool
- int() : ScalarType
- Returns the built-in Int scalar type.
- isAbstractType() : bool
- Determines if the given type is an abstract type.
- isBuiltInScalar() : bool
- Determines if the given type is a built-in scalar (Int, Float, String, Boolean, ID).
- isBuiltInScalarName() : bool
- Checks if the given name is one of the built-in scalar type names (ID, String, Int, Float, Boolean).
- isBuiltInType() : bool
- isCompositeType() : bool
- Determines if the given type is a composite type.
- isInputType() : bool
- Determines if the given type is an input type.
- isLeafType() : bool
- Determines if the given type is a leaf type.
- isOutputType() : bool
- Determines if the given type is an output type.
- jsonSerialize() : string
- listOf() : ListOfType<string|int, T>
- Wraps the given type in a list type.
- name() : string
- nonNull() : NonNull
- Wraps the given type in a non-null type.
- overrideStandardTypes() : void
- Allows partially or completely overriding the standard types globally.
- resolveType() : ObjectType|string|callable|Deferred|null
- Resolves the concrete ObjectType for the given value.
- resolveValue() : mixed
- Receives the original resolved value and transforms it if necessary.
- string() : ScalarType
- Returns the built-in String scalar type.
- toString() : string
- assertValidInterfaces() : void
- inferName() : string
- initializeFields() : void
- initializeInterfaces() : void
Constants
BOOLEAN
public
mixed
BOOLEAN
= 'Boolean'
BUILT_IN_SCALAR_NAMES
public
array<int, string>
BUILT_IN_SCALAR_NAMES
= [self::INT, self::FLOAT, self::STRING, self::BOOLEAN, self::ID]
BUILT_IN_TYPE_NAMES
Names of all built-in types: built-in scalars and introspection types.
public
array<int, string>
BUILT_IN_TYPE_NAMES
= [...self::BUILT_IN_SCALAR_NAMES, ...AutomatticWooCommerceVendorGraphQLTypeIntrospection::TYPE_NAMES]
Tags
FLOAT
public
mixed
FLOAT
= 'Float'
ID
public
mixed
ID
= 'ID'
INT
public
mixed
INT
= 'Int'
STANDARD_TYPE_NAMES
public
array<int, string>
STANDARD_TYPE_NAMES
= self::BUILT_IN_SCALAR_NAMES
Tags
STRING
public
mixed
STRING
= 'String'
Properties
$astNode
public
InterfaceTypeDefinitionNode|null
$astNode
$config
public
array<string|int, mixed>
$config
Tags
$description
public
string|null
$description
$extensionASTNodes
public
array<string|int, mixed>
$extensionASTNodes
$name
public
string
$name
$builtInScalars
protected
static array<string|int, mixed>|null
$builtInScalars
$builtInTypes
protected
static array<string|int, mixed>|null
$builtInTypes
$fields
Lazily initialized.
private
array<string|int, mixed>
$fields
$interfaces
Lazily initialized.
private
array<string|int, mixed>
$interfaces
Methods
__construct()
public
__construct(array<string|int, mixed> $config) : mixed
Parameters
- $config : array<string|int, mixed>
Tags
Return values
mixed —__toString()
public
__toString() : string
Return values
string —assertInterfaceType()
public
static assertInterfaceType(mixed $type) : self
Parameters
- $type : mixed
Tags
Return values
self —assertValid()
public
assertValid() : void
Tags
Return values
void —astNode()
public
astNode() : (\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\Node&\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\TypeDefinitionNode)|null
Return values
(\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\Node&\Automattic\WooCommerce\Vendor\GraphQL\Language\AST\TypeDefinitionNode)|null —boolean()
Returns the built-in Boolean scalar type.
public
static boolean() : ScalarType
Return values
ScalarType —builtInScalars()
Returns all built-in scalar types.
public
static builtInScalars() : array<string, ScalarType>
Return values
array<string, ScalarType> —builtInTypes()
Returns all built-in types: built-in scalars and introspection types.
public
static builtInTypes() : array<string, \Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType>
Return values
array<string, \Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType> —description()
public
description() : string|null
Return values
string|null —extensionASTNodes()
public
extensionASTNodes() : array<string|int, InterfaceTypeExtensionNode>
Return values
array<string|int, InterfaceTypeExtensionNode> —findField()
public
findField(string $name) : FieldDefinition|null
Parameters
- $name : string
Tags
Return values
FieldDefinition|null —float()
Returns the built-in Float scalar type.
public
static float() : ScalarType
Return values
ScalarType —getField()
public
getField(string $name) : FieldDefinition
Parameters
- $name : string
Tags
Return values
FieldDefinition —getFieldNames()
public
getFieldNames() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getFields()
public
getFields() : array<string, FieldDefinition>
Tags
Return values
array<string, FieldDefinition> —getInterfaces()
public
getInterfaces() : array<int, InterfaceType>
Return values
array<int, InterfaceType> —getNamedType()
Returns the underlying named type of the given type.
public
static getNamedType(Type|null $type) : (\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType)|null
Parameters
- $type : Type|null
Tags
Return values
(\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NamedType)|null —getNullableType()
Unwraps a potentially non-null type to return the underlying nullable type.
public
static getNullableType(Type $type) : Type|NullableType
Parameters
- $type : Type
Return values
Type|NullableType —getStandardTypes()
Returns all built-in scalar types.
public
static getStandardTypes() : array<string, ScalarType>
Tags
Return values
array<string, ScalarType> —getVisibleFields()
public
getVisibleFields() : array<string, FieldDefinition>
Return values
array<string, FieldDefinition> —hasField()
public
hasField(string $name) : bool
Parameters
- $name : string
Tags
Return values
bool —id()
Returns the built-in ID scalar type.
public
static id() : ScalarType
Return values
ScalarType —implementsInterface()
public
implementsInterface(InterfaceType $interfaceType) : bool
Parameters
- $interfaceType : InterfaceType
Return values
bool —int()
Returns the built-in Int scalar type.
public
static int() : ScalarType
Return values
ScalarType —isAbstractType()
Determines if the given type is an abstract type.
public
static isAbstractType(mixed $type) : bool
Parameters
- $type : mixed
Return values
bool —isBuiltInScalar()
Determines if the given type is a built-in scalar (Int, Float, String, Boolean, ID).
public
static isBuiltInScalar(mixed $type) : bool
Does not unwrap NonNull/List wrappers — checks the type instance directly. ScalarType is a NamedType, so {@see} is unnecessary.
Parameters
- $type : mixed
Tags
Return values
bool —isBuiltInScalarName()
Checks if the given name is one of the built-in scalar type names (ID, String, Int, Float, Boolean).
public
static isBuiltInScalarName(string $name) : bool
Parameters
- $name : string
Return values
bool —isBuiltInType()
public
isBuiltInType() : bool
Return values
bool —isCompositeType()
Determines if the given type is a composite type.
public
static isCompositeType(mixed $type) : bool
Parameters
- $type : mixed
Return values
bool —isInputType()
Determines if the given type is an input type.
public
static isInputType(mixed $type) : bool
Parameters
- $type : mixed
Return values
bool —isLeafType()
Determines if the given type is a leaf type.
public
static isLeafType(mixed $type) : bool
Parameters
- $type : mixed
Return values
bool —isOutputType()
Determines if the given type is an output type.
public
static isOutputType(mixed $type) : bool
Parameters
- $type : mixed
Return values
bool —jsonSerialize()
public
jsonSerialize() : string
Return values
string —listOf()
Wraps the given type in a list type.
public
static listOf(T|callable $type) : ListOfType<string|int, T>
Parameters
- $type : T|callable
Tags
Return values
ListOfType<string|int, T> —name()
public
name() : string
Return values
string —nonNull()
Wraps the given type in a non-null type.
public
static nonNull(NonNull|(\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NullableType&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type)|callable $type) : NonNull
Parameters
- $type : NonNull|(\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\NullableType&\Automattic\WooCommerce\Vendor\GraphQL\Type\Definition\Type)|callable
Return values
NonNull —overrideStandardTypes()
Allows partially or completely overriding the standard types globally.
public
static overrideStandardTypes(array<string|int, ScalarType> $types) : void
Parameters
- $types : array<string|int, ScalarType>
Tags
Return values
void —resolveType()
Resolves the concrete ObjectType for the given value.
public
resolveType(mixed $objectValue, mixed $context, ResolveInfo $info) : ObjectType|string|callable|Deferred|null
This will be called after resolveValue.
Parameters
- $objectValue : mixed
-
The resolved value for the object type
- $context : mixed
-
The context that was passed to GraphQL::execute()
- $info : ResolveInfo
Return values
ObjectType|string|callable|Deferred|null —resolveValue()
Receives the original resolved value and transforms it if necessary.
public
resolveValue(mixed $objectValue, mixed $context, ResolveInfo $info) : mixed
This will be called before resolveType.
Parameters
- $objectValue : mixed
-
The resolved value for the object type
- $context : mixed
-
The context that was passed to GraphQL::execute()
- $info : ResolveInfo
Return values
mixed — The possibly transformed valuestring()
Returns the built-in String scalar type.
public
static string() : ScalarType
Return values
ScalarType —toString()
public
abstract toString() : string
Return values
string —assertValidInterfaces()
protected
assertValidInterfaces() : void
Tags
Return values
void —inferName()
protected
inferName() : string
Tags
Return values
string —initializeFields()
private
initializeFields() : void
Tags
Return values
void —initializeInterfaces()
private
initializeInterfaces() : void
