Docs
Dashboard

products

Query

Returns a list of products.

#

Arguments


after
String

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

before
String

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

first
Int

Returns the first n elements from the list.

last
Int

Returns the last n elements from the list.

locale
String

The locale used by this operation.

priceChannelId
ID

The price channel id used by this operation.

priceCountry
String

The price country used by this operation.

priceCurrency
String

The price currency used by this operation.

query
String
A filter expression made up of terms, boolean operators, modifiers, and comparators. Combine one or more filters in a single query.
Available filters15
  • defaultstring

    Searches indexed product text such as names, vendors, SKUs, and tags. Every term must match.

    Examplesportable lamp"Portable Lamp"
  • idID

    Matches a product by its unique identifier.

    Exampleid:product_...
  • namestring

    Matches the product name. Phrases and prefix wildcards are supported.

    Examplesname:"Portable Lamp"name:port*
  • vendorstring

    Matches the product vendor.

    Examplevendor:acme
  • statusstring

    Matches the product's lifecycle status.

    Examplestatus:active
  • skustring

    Matches the SKU of any variant belonging to the product.

    Examplesku:LAMP-01
  • variant_idID

    Matches a product containing the specified variant.

    Examplevariant_id:vid_...
  • tagstring

    Matches a tag assigned to the product.

    Exampletag:lighting
  • category_idID

    Matches a product assigned to the specified category.

    Examplecategory_id:cat_...
  • collection_idID

    Matches a product assigned to the specified collection.

    Examplecollection_id:col_...
  • metadata.<key>string

    Matches, prefix-matches, or checks for an indexed metadata value.

    Examplesmetadata.import_source:erpmetadata.import_source:*
  • metafields.<namespace>.<key>string | number

    Matches a public metafield value, checks for its presence, or compares a numeric value.

    Examplesmetafields.specs.material:oakmetafields.specs.wattage:>=40
  • attributes.<attribute-name>string

    Matches a product attribute value.

    Exampleattributes.color:blue
  • available_for_saleboolean

    Matches products that are or are not available for sale in the current request context.

    Exampleavailable_for_sale:true
  • priceinteger

    Compares the best eligible price in minor currency units. The priceCurrency argument is required.

    Examplesprice:>=5000price:>=5000 AND price:<10000
sortDirection
SortDirection!Required

The direction used to order the returned resources.

Possible enum values
  • ASC

    Orders values from lowest to highest or alphabetically from A to Z.

  • DESC

    Orders values from highest to lowest or alphabetically from Z to A.

sortKey
ProductSortKeys!Required

The field used to order the returned resources.

Possible enum values
  • ID

    Sort by product identifier.

  • NAME

    Sort by product name.

  • PRICE

    Sorts by product variant prices, if ASC is specified, it will sort by the lowest price of the variants. If DESC is specified, it will sort by the highest price of the variants.

  • VENDOR

    Sort by the vendor value.

storeId
ID

The store id used by this operation.

#

Payload


aggregatesDeprecated
[Facet!]!

Gets the aggregates for the products in the current connection.

Deprecated: Use facets instead. This will be removed in v5
edges
[ProductsEdge!]

A list of edges.

facets
[Facet!]!

Gets the facets for the products in the current connection. Facets provide a way to retrieve aggregated information about the products, such as counts of products by certain attributes (e.g., color, size, brand) that can be used for filtering and navigation in the storefront.

nodes
[Product!]

A flattened list of the nodes

pageInfo
PageInfo!

Information to aid in pagination.

totalCount
Int!

Identifies the total count of items in the connection.