Sales & CRMQu Query

listProducts

Topics: Commerce

List products with pagination, filtering, and sorting. Requires product:list permission.

Returns

ProductConnection!

Arguments

first

IntOptional

Number of items from the start

after

StringOptional

Cursor to start after

Filter criteria

Sort order

Examples

Browse Commerce Products

query BrowseCommerceProducts($first: Int!) {
  listProducts(first: $first, filter: {isActive: {eq: true}}) {
    edges { node { id sku name productType basePrice currency } }
    pageInfo { endCursor hasNextPage }
  }
}

Variables

{
  "first": 20
}
Exact field SDL
"""
List products with pagination, filtering, and sorting. Requires product:list permission.
"""
listProducts(
  """Number of items from the start"""
  first: Int
  """Cursor to start after"""
  after: String
  """Filter criteria"""
  filter: ProductFilterInput
  """Sort order"""
  sort: [ProductSortInput!]
): ProductConnection! @topic(names: ["commerce"]) @topic_example(names: ["commerce.browse-products"])

Declared on Query. Access is checked by the platform for each operation.