import { ShopifyProductVariant } from '@daffodil/driver/shopify'
A specific version of a product available for sale, differentiated by options like size or color. For example, a small blue t-shirt and a large blue t-shirt are separate variants of the same product. For more information, see the docs on Shopify's product model.
For products with quantity rules, variants enforce minimum, maximum, and increment constraints on purchases.
Variants also support subscriptions and pre-orders through selling plan allocations objects, bundle configurations through product variant components objects, and shop pay installments pricing for flexible payment options.
interface ShopifyProductVariant {
__typename: "ProductVariant"
availableForSale: boolean
barcode: string
compareAtPrice: ShopifyMoneyV2
compareAtPriceV2: ShopifyMoneyV2
components: ShopifyProductVariantComponentConnection
currentlyNotInStock: boolean
groupedBy: ShopifyProductVariantConnection
id: string
image: ShopifyImage
metafield: ShopifyMetafield
metafields: ShopifyMetafield[]
price: ShopifyMoneyV2
priceV2: ShopifyMoneyV2
product: ShopifyProduct
quantityAvailable: number
quantityPriceBreaks: ShopifyQuantityPriceBreakConnection
quantityRule: ShopifyQuantityRule
requiresComponents: boolean
requiresShipping: boolean
selectedOptions: ShopifySelectedOption[]
sellingPlanAllocations: ShopifySellingPlanAllocationConnection
shopPayInstallmentsPricing: ShopifyShopPayInstallmentsProductVariantPricing
sku: string
storeAvailability: ShopifyStoreAvailabilityConnection
taxable: boolean
title: string
unitPrice: ShopifyMoneyV2
unitPriceMeasurement: ShopifyUnitPriceMeasurement
weight: number
weightUnit: ShopifyWeightUnit
}
__typename "ProductVariant" |
|---|
availableForSale boolean |
|---|
Indicates if the product variant is available for sale. |
barcode string |
|---|
The barcode (for example, ISBN, UPC, or GTIN) associated with the variant. |
compareAtPrice ShopifyMoneyV2 |
|---|
The compare at price of the variant. This can be used to mark a variant as on sale, when |
compareAtPriceV2 ShopifyMoneyV2 |
|---|
The compare at price of the variant. This can be used to mark a variant as on sale, when |
components ShopifyProductVariantComponentConnection |
|---|
List of bundles components included in the variant considering only fixed bundles. |
currentlyNotInStock boolean |
|---|
Whether a product is out of stock but still available for purchase (used for backorders). |
groupedBy ShopifyProductVariantConnection |
|---|
List of bundles that include this variant considering only fixed bundles. |
id string |
|---|
A globally-unique ID. |
image ShopifyImage |
|---|
Image associated with the product variant. This field falls back to the product image if no image is available. |
metafield ShopifyMetafield |
|---|
A custom field, including its |
metafields ShopifyMetafield[] |
|---|
A list of custom fields that a merchant associates with a Shopify resource. |
price ShopifyMoneyV2 |
|---|
The product variant’s price. |
priceV2 ShopifyMoneyV2 |
|---|
The product variant’s price. |
product ShopifyProduct |
|---|
The product object that the product variant belongs to. |
quantityAvailable number |
|---|
The total sellable quantity of the variant for online sales channels. |
quantityPriceBreaks ShopifyQuantityPriceBreakConnection |
|---|
A list of quantity breaks for the product variant. |
quantityRule ShopifyQuantityRule |
|---|
The quantity rule for the product variant in a given context. |
requiresComponents boolean |
|---|
Whether a product variant requires components. The default value is |
requiresShipping boolean |
|---|
Whether a customer needs to provide a shipping address when placing an order for the product variant. |
selectedOptions ShopifySelectedOption[] |
|---|
List of product options applied to the variant. |
sellingPlanAllocations ShopifySellingPlanAllocationConnection |
|---|
Represents an association between a variant and a selling plan. Selling plan allocations describe which selling plans are available for each variant, and what their impact is on pricing. |
shopPayInstallmentsPricing ShopifyShopPayInstallmentsProductVariantPricing |
|---|
The Shop Pay Installments pricing information for the product variant. |
sku string |
|---|
The SKU (stock keeping unit) associated with the variant. |
storeAvailability ShopifyStoreAvailabilityConnection |
|---|
The in-store pickup availability of this variant by location. |
taxable boolean |
|---|
Whether tax is charged when the product variant is sold. |
title string |
|---|
The product variant’s title. |
unitPrice ShopifyMoneyV2 |
|---|
The unit price value for the variant based on the variant's measurement. |
unitPriceMeasurement ShopifyUnitPriceMeasurement |
|---|
The unit price measurement for the variant. |
weight number |
|---|
The weight of the product variant in the unit system specified with |
weightUnit ShopifyWeightUnit |
|---|
Unit of measurement for weight. |