GitHub

ShopifyProductOptionValue

Type

import { ShopifyProductOptionValue } from '@daffodil/driver/shopify'

A specific value for a ProductOption, such as "Red" or "Blue" for a "Color" option. Option values combine across different options to create ProductVariant objects.

Each value can include a visual swatch that displays a color or image. The firstSelectableVariant field returns the variant that combines this option value with the lowest-position values for all other options. This is useful for building product selection interfaces.

Learn more about Shopify's product model.

interface ShopifyProductOptionValue {
  __typename: "ProductOptionValue"
  firstSelectableVariant: ShopifyProductVariant
  id: string
  name: string
  swatch: ShopifyProductOptionValueSwatch
}

Properties

__typename
"ProductOptionValue"
firstSelectableVariant
ShopifyProductVariant

The product variant that combines this option value with the lowest-position option values for all other options.

This field will always return a variant, provided a variant including this option value exists.

id
string

A globally-unique ID.

name
string

The name of the product option value.

swatch
ShopifyProductOptionValueSwatch

The swatch of the product option value.