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 {
  # 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

  # Globally unique identifier.
  id: ID!

  # Image associated with the product variant. This field falls back to the product image if no image is available.
  image(
    # Crops the image according to the specified region. This argument is
    # deprecated: Use `crop` on `Image.transformedSrc` instead.
    crop: CropRegion

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

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

    # 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

  # List of prices and compare-at prices in the presentment currencies for this shop.
  presentmentPrices(
    # Returns the elements that come after the specified cursor.
    after: String

    # Returns the elements that come before the specified cursor.
    before: String

    # Returns up to the first `n` elements from the list.
    first: Int

    # Returns up to the last `n` elements from the list.
    last: Int

    # The presentment currencies prices should return in.
    presentmentCurrencies: [CurrencyCode!]

    # Reverse the order of the underlying list.
    reverse: Boolean = false
  ): ProductVariantPricePairConnection!

  # 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

Connections

presentmentPrices   (ProductVariantPricePairConnection!)

List of prices and compare-at prices in the presentment currencies for this shop.

Argument Type Default Description
after

String

Returns the elements that come after the specified cursor.

before

String

Returns the elements that come before the specified cursor.

first

Int

Returns up to the first n elements from the list.

last

Int

Returns up to the last n elements from the list.

presentmentCurrencies

[CurrencyCode!]

The presentment currencies prices should return in.

reverse

Boolean

false

Reverse the order of the underlying list.

Fields

availableForSale   (Boolean!)

Indicates if the product variant is available for sale.

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.

id   (ID!)

Globally unique identifier.

image   (Image)

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

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.

product   (Product!)

The product object that the product variant belongs to.

selectedOptions   ([SelectedOption!]!)

List of product options applied to the variant.

sku   (String)

The SKU (stock keeping unit) associated with 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.

Deprecated fields

Show/Hide

available   (Boolean)

deprecated

Indicates if the product variant is in stock.

Deprecation warning

Use availableForSale instead

Sign up for a Partner account to get started.

Sign up