ProductVariant

Required access

unauthenticated_read_product_listings access scope

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 {
  # Globally unique identifier.
  id: ID!

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

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

  # The compare at price of the variant. This can be used to mark a variant as on
  # sale, when `compareAtPrice` is higher than `price`.
  compareAtPrice: Money

  # Image associated with the product variant. This field falls back to the product image if no image is available.
  image(
    # Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead.
    maxWidth: Int

    # Image height in pixels between 1 and 2048. This argument is deprecated: Use
    # `maxHeight` on `Image.transformedSrc` instead.
    maxHeight: Int

    # Crops the image according to the specified region. This argument is
    # deprecated: Use `crop` on `Image.transformedSrc` instead.
    crop: CropRegion

    # Image size multiplier for high-resolution retina displays. Must be between 1
    # and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead.
    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 SKU (Stock Keeping Unit) associated with the variant.
  sku: String

  # 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

availableForSale   (Boolean!)

Indicates if the product variant is available for sale.

Required access

unauthenticated_read_ access scope

compareAtPrice   (Money)

The compare at price of the variant. This can be used to mark a variant as on sale, when compareAtPrice is higher than price.

Required access

unauthenticated_read_ access scope

id   (ID!)

Globally unique identifier.

Required access

unauthenticated_read_ access scope

image   (Image)

Image associated with the product variant. This field falls back to the product image if no image is available.

Required access

unauthenticated_read_ access scope

Argument Type Default Description
crop

CropRegion

Crops the image according to the specified region. This argument is deprecated: Use crop on Image.transformedSrc instead.

maxHeight

Int

Image height in pixels between 1 and 2048. This argument is deprecated: Use maxHeight on Image.transformedSrc instead.

maxWidth

Int

Image width in pixels between 1 and 2048. This argument is deprecated: Use maxWidth on Image.transformedSrc instead.

scale

Int

1

Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use scale on Image.transformedSrc instead.

price   (Money!)

The product variant’s price.

Required access

unauthenticated_read_ access scope

product   (Product!)

The product object that the product variant belongs to.

Required access

unauthenticated_read_ access scope

selectedOptions   ([SelectedOption!]!)

List of product options applied to the variant.

Required access

unauthenticated_read_ access scope

sku   (String)

The SKU (Stock Keeping Unit) associated with the variant.

Required access

unauthenticated_read_ access scope

title   (String!)

The product variant’s title.

Required access

unauthenticated_read_ access scope

weight   (Float)

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

Required access

unauthenticated_read_ access scope

weightUnit   (WeightUnit!)

Unit of measurement for weight.

Required access

unauthenticated_read_ access scope

Deprecated fields

Show/Hide

available   (Boolean)

deprecated

Indicates if the product variant is in stock.

Deprecation warning

Use availableForSale instead

Required access

unauthenticated_read_ access scope

Sign up for a Partner account to get started.

Sign up