Skip to main content
Anchor to ProductVariantConnection

ProductVariantConnection

connection

An auto-generated type for paginating through multiple ProductVariants.

Anchor to Fields with this connectionFields with this connection

•OBJECT

The product variants associated with this delivery profile.

•OBJECT

The list of product variants that the discount can have as a prerequisite or the list of product variants to which the discount can be applied.

•OBJECT

The product variants to which the price rule applies.

•OBJECT

The product variants required for the price rule to be applicable.

•OBJECT

A list of variants associated with the product.

•OBJECT

The list of products' variants that are components.

•OBJECT

Product variants associated to the selling plan group.


Was this section helpful?

Anchor to Queries with this connectionQueries with this connection

•query

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 productVariants 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 productVariants query supports pagination to handle large product catalogs and saved searches for frequently used product variant queries.

The productVariants 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.


Was this section helpful?

•[ProductVariantEdge!]!
non-null

The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.

•[ProductVariant!]!
non-null

A list of nodes that are contained in ProductVariantEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.

•PageInfo!
non-null

An object that’s used to retrieve cursor information about the current page.


Was this section helpful?