Variant

Type
Class
Namespace
craft\commerce\gql\interfaces\elements
Inherits
craft\commerce\gql\interfaces\elements\Variant » craft\gql\interfaces\Element (opens new window) » craft\gql\base\InterfaceType (opens new window)
Implements
craft\gql\base\SingularTypeInterface (opens new window)
Since
3.1

Class Variant

View source (opens new window)

# Public Methods

Method Description
getDraftFieldDefinitions() (opens new window) List the draft field definitions.
getFieldDefinitions() List of fields for this type.
getName() Returns the schema object name
getType() Return an instance of the GraphQL type.
getTypeGenerator() Returns the associated type generator class.
resolveElementTypeName() (opens new window) Resolve an element type name.

# getFieldDefinitions()

List of fields for this type.

View source (opens new window)

Returns

array (opens new window)

# getName()

Returns the schema object name

View source (opens new window)

Returns

string (opens new window)

# getType()

Return an instance of the GraphQL type.

View source (opens new window)

Arguments

  • $fields

Returns

\GraphQL\Type\Definition\Type

# getTypeGenerator()

Returns the associated type generator class.

View source (opens new window)

Returns

string (opens new window)