Skip to main content

collectionItems Query

Description​

Retrieves paginated items for a collection by its numeric ID.

query collectionItems(
$id: Int
$filters: JSON
$pagination: PaginationInput!
$randomise: Boolean!
) {
collectionItems(
id: $id
filters: $filters
pagination: $pagination
randomise: $randomise
) {
items {
creatorsId
_id
id
type
incId
uniqueId
oldId
created
modified
isForbiddenForSale
handle
path
uri
wants
bitly
}
pagination {
limit
count
page
pages
hasMore
}
}
}

Variables​

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

Response​

{
"collectionItems": {
"items": [
{
"creatorsId": "example",
"_id": "cf7c5dcd853457d2e3762d99",
"id": "example",
"type": "ReleaseItem",
"incId": 1.23,
"uniqueId": "example",
"oldId": 1.23,
"created": 1742375556526,
"modified": 1790242886420,
"isForbiddenForSale": true,
"handle": "example",
"path": "/release/1763553751/release-artist-release-name",
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"wants": 42,
"bitly": "example"
}
],
"pagination": {
"limit": 20,
"count": 10,
"page": 1,
"pages": 1,
"hasMore": true
}
}
}

Arguments​

NameTypeDescription
idIntNumeric ID of the collection
filtersJSONJSON object specifying the filters
paginationPaginationInput!Pagination options including page, limit, sort, and order
randomiseBoolean!Whether to randomise the item order

Returns​

CollectionItems