Skip to Content

ProductOption

A selectable product option, such as size or color.

Type Definition

type ProductOption { isForCombinedListing: Boolean handle: String sortOrder: Int title: String taxonomyAttributeId: Int taxonomyAttributeHandle: String taxonomyAttribute: ProductTaxonomyAttribute values: [ProductOptionValue] selectedValue: ProductOptionValue }

Fields

FieldTypeDescription
isForCombinedListingBooleanReturns whether this option is for a combined listing.
handleStringReturns the handle.
sortOrderIntReturns the sort order.
titleStringReturns the title.
taxonomyAttributeIdIntReturns the taxonomy attribute ID.
taxonomyAttributeHandleStringReturns the taxonomy attribute handle.
taxonomyAttributeProductTaxonomyAttributeReturns the related taxonomy attribute for this option.
values[ProductOptionValue]Returns the values for this option.
selectedValueProductOptionValueReturns the selected value for this option.

Relationships

ProductOption represents a configurable attribute of a product. It maintains relationships with ProductTaxonomyAttribute, which provides structured taxonomy information about the option, and ProductOptionValue, which represents the individual selectable values available for this option. The selectedValue field indicates which value from the values list is currently chosen. ProductOption is used by ProductVariantOption to associate options with specific product variants.

Example

{ isForCombinedListing handle sortOrder title taxonomyAttributeId taxonomyAttributeHandle taxonomyAttribute { id } values { id } selectedValue { id } }

Implements

None