Skip to content
Saleor
Esc
↑↓navigate↵open⌘Jpreview

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

productVariants Query

List of product variants.

Requires one of the following permissions to include the unpublished items:MANAGE_ORDERSMANAGE_DISCOUNTSMANAGE_PRODUCTS
productVariants(ids: [ID!], channel: String, filter: ProductVariantFilterInput, where: ProductVariantWhereInput, search: String, sortBy: ProductVariantSortingInput, before: String, after: String, first: Int, last: Int): ProductVariantCountableConnection

Returns

ProductVariantCountableConnection

Show return type
type ProductVariantCountableConnection {
  pageInfo: PageInfo!
  edges: [ProductVariantCountableEdge!]!
  totalCount: Int
}

Arguments

ids

ids · [ID!]

Filter product variants by given IDs.

channel

channel · String

Slug of a channel for which the data should be returned.

filter

filter · ProductVariantFilterInput

Filtering options for product variants.

where

where · ProductVariantWhereInput

Where filtering options for product variants.

search · String

Search product variants.

sortBy

sortBy · ProductVariantSortingInput

Sort products variants.

before

before · String

Return the elements in the list that come before the specified cursor.

after

after · String

Return the elements in the list that come after the specified cursor.

first

first · Int

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

last

last · Int

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.


Schema: Saleor 3.23.43. Download SDL.

Last updated on April 13, 2026

Was this page helpful?