collectionsConnection Query
Description
Retrieves a paginated list of collections.
query collectionsConnection(
$page: Int
$perPage: Int
$term: String
$sort: CollectionSortInput
) {
collectionsConnection(
page: $page
perPage: $perPage
term: $term
sort: $sort
) {
collections {
_id
created
id
title
handle
viewType
path
}
pagination {
limit
count
page
pages
hasMore
}
}
}
Variables
{
"page": 1,
"perPage": 42,
"term": "term",
"sort": {
"key": "key",
"order": 42
}
}
Response
{
"collectionsConnection": {
"collections": [
{
"_id": "aba7e736ca163a52a07cdc69",
"created": 1754923615000,
"id": 7606332172178,
"title": "example",
"handle": "example",
"viewType": "example",
"path": "/release/1763553751/release-artist-release-name"
}
],
"pagination": {
"limit": 20,
"count": 10,
"page": 1,
"pages": 1,
"hasMore": true
}
}
}
Arguments
| Name | Type | Description |
|---|---|---|
page | Int | Use this argument to specify the page number. |
perPage | Int | Number of collections per page. You can request a specific page size, and it will be used if it does not exceed the server-enforced maximum. If your requested size exceeds the maximum, the server will enforce the maximum limit. |
term | String | Search term to filter collections by |
sort | CollectionSortInput | Sorting options for collections |