⚠️ Deprecated: Use inventoryItems with inventoryFiltersPagination instead
inventory Query
Description
Retrieves a paginated inventory with filtering options.
query inventory(
$from: String
$to: String
$preorder: Boolean
$preorders: String
$type: String
$itemTypes: [String!]
$manufacturers: [String]
$types: [String]
$maxPrice: Int
$countries: [String]
$years: [Int]
$artists: [Float]
$labels: [Float]
$formats: [String]
$mediums: [String]
$categories: [String]
$stock: String
$condition: String
$order: Int
$sort: String
$limit: Int
$page: Int
$styles: [String]
$genres: [String]
$wantlist: Boolean
$noFilters: Boolean
$randomise: Boolean
) {
inventory(
from: $from
to: $to
preorder: $preorder
preorders: $preorders
type: $type
itemTypes: $itemTypes
manufacturers: $manufacturers
types: $types
maxPrice: $maxPrice
countries: $countries
years: $years
artists: $artists
labels: $labels
formats: $formats
mediums: $mediums
categories: $categories
stock: $stock
condition: $condition
order: $order
sort: $sort
limit: $limit
page: $page
styles: $styles
genres: $genres
wantlist: $wantlist
noFilters: $noFilters
randomise: $randomise
) {
pagination {
limit
count
page
pages
sort
order
hasMore
}
items {
_id
id
created
wanted
path
uri
type
isForbiddenForSale
handle
bitly
}
filters
}
}
Variables
{
"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"
],
"mediums": [
"mediums"
],
"categories": [
"categories"
],
"stock": "stock",
"condition": "condition",
"order": 42,
"sort": "sort",
"limit": 20,
"page": 1,
"styles": [
"styles"
],
"genres": [
"genres"
],
"wantlist": true,
"noFilters": true,
"randomise": true
}
Response
{
"inventory": {
"pagination": {
"limit": 20,
"count": 10,
"page": 1,
"pages": 1,
"sort": "example",
"order": 42,
"hasMore": true
},
"items": [
{
"_id": "921869f7661af8275a11744a",
"id": 1.23,
"created": 1754162473231,
"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"
}
],
"filters": {}
}
}
Arguments
| Name | Type | Description |
|---|---|---|
from | String | Lower bound for price range filter. |
to | String | Upper bound for price range filter. |
preorder | Boolean | Filter for pre-order items only. |
preorders | String | Filter for pre-order status. |
type | String | Filter by item type. |
itemTypes | [String!] | Filter by multiple item types. |
manufacturers | [String] | Filter by manufacturer names. |
types | [String] | Filter by format types. |
maxPrice | Int | Maximum price filter. |
countries | [String] | Filter by country codes. |
years | [Int] | Filter by release years. |
artists | [Float] | Filter by artist identifiers. |
labels | [Float] | Filter by label identifiers. |
formats | [String] | Filter by format names. |
mediums | [String] | Filter by medium types. |
categories | [String] | Filter by category names. |
stock | String | Filter by stock status. |
condition | String | Filter by item condition. |
order | Int | Sort order (1 for ascending, -1 for descending). |
sort | String | Field name to sort by. |
limit | Int | Number of items per page. Your requested size is used if it does not exceed the server-enforced maximum limit. |
page | Int | The requested page number. Defaults to 1 if not specified. |
styles | [String] | Filter by musical styles. |
genres | [String] | Filter by musical genres. |
wantlist | Boolean | Filter for items in the user's wantlist. |
noFilters | Boolean | Return all items without applying any filters. |
randomise | Boolean | Whether to randomize the item order. |