ProductVariant

A product variant represents a different version of a product, such as differing sizes or differing colors.

Show definition
# A product variant represents a different version of a product, such as differing sizes or differing colors.
type ProductVariant implements Node {
  id: ID!

  # Indicates if the product variant is in stock.
  available: Boolean

  # Indicates if the product variant is available for sale.
  availableForSale: Boolean!

  # Image associated with the product variant.
  image(
    # Image width in pixels between 1 and 2048
    maxWidth: Int

    # Image height in pixels between 1 and 2048
    maxHeight: Int

    # If specified, crop the image keeping the specified region
    crop: CropRegion

    # Image size multiplier retina displays. Must be between 1 and 3
    scale: Int = 1
  ): Image

  # The product variant’s price.
  price: Money!

  # The product object that the product variant belongs to.
  product: Product!

  # List of product options applied to the variant.
  selectedOptions: [SelectedOption!]!

  # The product variant’s title.
  title: String!

  # The weight of the product variant in the unit system specified with `weight_unit`.
  weight: Float

  # Unit of measurement for weight.
  weightUnit: WeightUnit!
}

Implements

Fields

available   (Boolean) deprecated

Indicates if the product variant is in stock.

Use availableForSale instead

availableForSale   (Boolean!)

Indicates if the product variant is available for sale.

id   (ID!)

image   (Image)

Image associated with the product variant.

Argument Type Default Description
crop CropRegion

If specified, crop the image keeping the specified region

maxHeight Int

Image height in pixels between 1 and 2048

maxWidth Int

Image width in pixels between 1 and 2048

scale Int 1

Image size multiplier retina displays. Must be between 1 and 3

price   (Money!)

The product variant’s price.

product   (Product!)

The product object that the product variant belongs to.

selectedOptions   ([SelectedOption!]!)

List of product options applied to the variant.

title   (String!)

The product variant’s title.

weight   (Float)

The weight of the product variant in the unit system specified with weight_unit.

weightUnit   (WeightUnit!)

Unit of measurement for weight.