Variant

Type
Class
Namespace
craft\commerce\gql\types\elements
Inherits
craft\commerce\gql\types\elements\Variant » craft\gql\types\elements\Element (opens new window) » craft\gql\base\ObjectType (opens new window) » GraphQL\Type\Definition\ObjectType
Since
3.1

Class Variant

View source (opens new window)

# Public Methods

Method Description
__construct()
resolveWithDirectives() (opens new window) Resolve a value with the directives that apply to it.

# __construct()

View source (opens new window)

Arguments

  • $config

# Protected Methods

Method Description
resolve() Resolve a field value with arguments, context and resolve information.

# resolve()

Resolve a field value with arguments, context and resolve information.

View source (opens new window)

Arguments

  • $source (mixed) – The parent data source to use for resolving this field
  • $arguments (array (opens new window)) – Arguments for resolving this field.
  • $context (mixed) – The context shared between all resolvers
  • $resolveInfo (\GraphQL\Type\Definition\ResolveInfo) – The resolve information

Returns

mixed – $result