Anchor to productVariantsproduct
queryproduct Variants
Retrieves a list of product variants associated with a product.
A product variant is a specific version of a product that comes in more than one option, such as size or color. For example, if a merchant sells t-shirts with options for size and color, then a small, blue t-shirt would be one product variant and a large, blue t-shirt would be another.
Use the query when you need to:
- Search for product variants by attributes such as SKU, barcode, or inventory quantity.
- Filter product variants by attributes, such as whether they're gift cards or have custom metafields.
- Fetch product variants for bulk operations, such as updating prices or inventory.
- Preload data for product variants, such as inventory items, selected options, or associated products.
The query supports pagination
to handle large product catalogs and saved searches
for frequently used product variant queries.
The query returns product variants with their associated metadata, including:
- Basic product variant information (for example, title, SKU, barcode, price, and inventory)
- Media attachments (for example, images and videos)
- Associated products, selling plans, bundles, and metafields
Learn more about working with Shopify's product model.
Anchor to Arguments
•ProductVariantConnection!ProductVariantConnection arguments
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore