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

Response

{
"collectionItems": {
"collection": {
"_id": "b59b7f8b58f93f91e10196e5",
"id": 8612499709007,
"title": "example",
"handle": "example",
"viewType": "example",
"path": "/release/1763553751/release-artist-release-name"
},
"items": [
{
"_id": "91dc23a6a32cb3ee8ef44c50",
"id": 1.23,
"created": 1730750247198,
"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": 42,
"hasMore": true
}
}
}

Arguments

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

Returns

CollectionItems