products
QueryReturns a list of products.
Arguments
- String
after Returns the elements in the list that come after the specified cursor.
- String
before Returns the elements in the list that come before the specified cursor.
- Int
first Returns the first n elements from the list.
- Int
last Returns the last n elements from the list.
- String
locale The locale used by this operation.
- ID
priceChannelId The price channel id used by this operation.
- String
priceCountry The price country used by this operation.
- String
priceCurrency The price currency used by this operation.
- String
query - A filter expression made up of terms, boolean operators, modifiers, and comparators. Combine one or more filters in a single query.
Available filters15
defaultstringSearches indexed product text such as names, vendors, SKUs, and tags. Every term must match.
Examplesportable lamp"Portable Lamp"idIDMatches a product by its unique identifier.
Exampleid:product_...namestringMatches the product name. Phrases and prefix wildcards are supported.
Examplesname:"Portable Lamp"name:port*vendorstringMatches the product vendor.
Examplevendor:acmestatusstringMatches the product's lifecycle status.
Examplestatus:activeskustringMatches the SKU of any variant belonging to the product.
Examplesku:LAMP-01variant_idIDMatches a product containing the specified variant.
Examplevariant_id:vid_...tagstringMatches a tag assigned to the product.
Exampletag:lightingcategory_idIDMatches a product assigned to the specified category.
Examplecategory_id:cat_...collection_idIDMatches a product assigned to the specified collection.
Examplecollection_id:col_...metadata.<key>stringMatches, prefix-matches, or checks for an indexed metadata value.
Examplesmetadata.import_source:erpmetadata.import_source:*metafields.<namespace>.<key>string | numberMatches a public metafield value, checks for its presence, or compares a numeric value.
Examplesmetafields.specs.material:oakmetafields.specs.wattage:>=40attributes.<attribute-name>stringMatches a product attribute value.
Exampleattributes.color:blueavailable_for_salebooleanMatches products that are or are not available for sale in the current request context.
Exampleavailable_for_sale:truepriceintegerCompares the best eligible price in minor currency units. The priceCurrency argument is required.
Examplesprice:>=5000price:>=5000 AND price:<10000
- SortDirection!Required
sortDirection The direction used to order the returned resources.
Possible enum valuesASCOrders values from lowest to highest or alphabetically from A to Z.
DESCOrders values from highest to lowest or alphabetically from Z to A.
- ProductSortKeys!Required
sortKey The field used to order the returned resources.
Possible enum valuesIDSort by product identifier.
NAMESort by product name.
PRICESorts 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.
VENDORSort by the vendor value.
- ID
storeId The store id used by this operation.
Payload
- [Facet!]!
aggregatesDeprecated Gets the aggregates for the products in the current connection.
Deprecated: Use facets instead. This will be removed in v5- [ProductsEdge!]
edges A list of edges.
- [Facet!]!
facets 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.
- [Product!]
nodes A flattened list of the nodes
- PageInfo!
pageInfo Information to aid in pagination.
- Int!
totalCount Identifies the total count of items in the connection.