Skip to main content

collectionItems Query

Description

Retrieves a collection with paginated items.

query collectionItems(
$id: Int!
$pagination: PaginationInput!
$randomise: Boolean!
) {
collectionItems(id: $id, pagination: $pagination, randomise: $randomise) {
collection {
_id
id
title
handle
viewType
path
}
items {
_id
id
created
wanted
path
uri
type
isForbiddenForSale
handle
bitly
}
pagination {
limit
count
page
pages
sort
order
hasMore
}
}
}

Variables

{
"id": 6810345949190,
"pagination": {
"limit": 20,
"page": 1,
"sort": "sort",
"order": -1
},
"randomise": true
}

Response

{
"collectionItems": {
"collection": {
"_id": "9eb642378d7effe12ca2e7e1",
"id": 4715194125012,
"title": "example",
"handle": "example",
"viewType": "example",
"path": "/release/1763553751/release-artist-release-name"
},
"items": [
{
"_id": "66e1a5ee4b8e84137d49a34d",
"id": 1.23,
"created": 1725339004585,
"wanted": true,
"path": "/release/1763553751/release-artist-release-name",
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"type": "example",
"isForbiddenForSale": true,
"handle": "example",
"bitly": "example"
}
],
"pagination": {
"limit": 20,
"count": 10,
"page": 1,
"pages": 1,
"sort": "example",
"order": -1,
"hasMore": true
}
}
}

Arguments

NameTypeDescription
idInt!Numeric identifier for the collection.
paginationPaginationInput!Pagination and sorting parameters.
randomiseBoolean!Whether to randomize the item order.

Returns

CollectionItems