List of the shop’s collections.


Returns the elements that come after the specified cursor.

Returns the elements that come before the specified cursor.

Returns up to the first n elements from the list.

Returns up to the last n elements from the list.

Apply one or multiple filters to the query. Refer to the detailed search syntax for more information about using filters.

Anchor to reverse
reverse
default:false

Reverse the order of the underlying list.

Sort the underlying list by the given key.


Was this section helpful?

A list of edges.

A list of the nodes contained in CollectionEdge.

Information to aid in pagination.

The total count of Collections.


Was this section helpful?
Retrieve collections
Hide code
DescriptionCopy
query {
  collections(first: 2) {
    edges {
      node {
        id
        products(first: 5) {
          edges {
            node {
              id
            }
          }
        }
      }
    }
  }
}
Hide code
Response
JSON
{
  "collections": {
    "edges": [
      {
        "node": {
          "id": "gid://shopify/Collection/547751128",
          "products": {
            "edges": [
              {
                "node": {
                  "id": "gid://shopify/Product/929898465"
                }
              },
              {
                "node": {
                  "id": "gid://shopify/Product/538825261"
                }
              }
            ]
          }
        }
      },
      {
        "node": {
          "id": "gid://shopify/Collection/585546552",
          "products": {
            "edges": []
          }
        }
      }
    ]
  }
}