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": 1954052056133,
"filters": {},
"pagination": {
"page": 1,
"limit": 20,
"sort": "sort",
"order": -1
},
"randomise": true
}

Response

{
"collectionItems": {
"items": [
{
"creatorsId": "example",
"_id": "021f5ef0385ab35f37dcb8f7",
"id": 1.23,
"type": "ReleaseItem",
"incId": 1.23,
"uniqueId": "example",
"oldId": 1.23,
"created": 1752531802472,
"modified": 1721801784203,
"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