Menu
collections
Returns a paginated list of the shop's collections. Each Collection object includes a nested connection to its products.
Use it in a workflow
- Add a step and choose the Shopify Storefront connector.
- Pick the collections action (under Collections).
- Fill in the fields below, then reference the result from later steps as
{{collections.response.data}}.
Query
This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.
query Collections($first: Int, $after: String, $last: Int, $before: String, $reverse: Boolean, $sortKey: CollectionSortKeys, $query: String) {
collections(
first: $first
after: $after
last: $last
before: $before
reverse: $reverse
sortKey: $sortKey
query: $query
) {
edges {
cursor
node {
descriptionHtml
handle
id
image
onlineStoreUrl
seo
title
trackingParameters
updatedAt
}
}
nodes {
descriptionHtml
handle
id
image {
altText
height
id
originalSrc
src
thumbhash
width
}
onlineStoreUrl
seo {
description
title
}
title
trackingParameters
updatedAt
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"first": 0,
"after": "string",
"last": 0,
"before": "string",
"reverse": false,
"sortKey": "TITLE",
"query": "string"
}
Response
Read the result with {{collections.response.data.data.collections}}. If the API returns errors, the step fails and they are at {{collections.response.data.errors}}.
Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?