collection Query
Description
Retrieves a collection with its first page of items.
query collection(
$handle: String
$id: Int
$page: Int
$limit: Int
$order: Int
$sort: String
$randomise: Boolean
) {
collection(
handle: $handle
id: $id
page: $page
limit: $limit
order: $order
sort: $sort
randomise: $randomise
) {
collection {
_id
id
title
handle
viewType
path
}
}
}
Variables
{
"handle": "handle",
"id": 6103356049721,
"page": 1,
"limit": 20,
"order": 42,
"sort": "sort",
"randomise": true
}
Response
{
"collection": {
"collection": {
"_id": "00aec8f03643f4f41ac86c70",
"id": 7622111672579,
"title": "example",
"handle": "example",
"viewType": "example",
"path": "/release/1763553751/release-artist-release-name"
}
}
}
Arguments
| Name | Type | Description |
|---|---|---|
handle | String | URL-friendly handle for the collection. |
id | Int | Numeric identifier for the collection. |
page | Int | Page number to retrieve. |
limit | Int | Number of items per page. Your requested size is used if it does not exceed the server-enforced maximum limit. |
order | Int | Sort order (1 for ascending, -1 for descending). |
sort | String | Field name to sort by. |
randomise | Boolean | Whether to randomize the item order. |