Skip to main content

inventoryItems Query

Description

Retrieves paginated inventory items with filtering.

query inventoryItems(
$filters: InventoryFiltersInput!
$pagination: PaginationInput!
) {
inventoryItems(filters: $filters, pagination: $pagination) {
items {
_id
id
created
wanted
path
uri
type
isForbiddenForSale
handle
bitly
}
pagination {
limit
count
page
pages
sort
order
hasMore
}
}
}

Variables

{
"filters": {
"from": "from",
"to": "to",
"preorder": true,
"preorders": "preorders",
"type": "type",
"itemTypes": [
"itemTypes"
],
"manufacturers": [
"manufacturers"
],
"types": [
"types"
],
"maxPrice": 42,
"countries": [
"Canada"
],
"years": [
42
],
"artists": [
30.7
],
"labels": [
30.7
],
"formats": [
"formats"
],
"formatDescriptions": [
"formatDescriptions"
],
"mediums": [
"mediums"
],
"categories": [
"categories"
],
"stock": "stock",
"condition": "condition",
"styles": [
"styles"
],
"genres": [
"genres"
],
"wantlist": true,
"noFilters": true
},
"pagination": {
"limit": 20,
"page": 1,
"sort": "sort",
"order": 42
}
}

Response

{
"inventoryItems": {
"items": [
{
"_id": "e5eb231795d34ec1c8e4b982",
"id": 1.23,
"created": 1731031718891,
"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
filtersInventoryFiltersInput!Filter criteria for the inventory query.
paginationPaginationInput!Pagination and sorting parameters.

Returns

InventoryItems!