Skip to content

Stock level of a product at a specific store

graphql
type Inventory {
  id: String!
  quantity: Int!
  updatedAt: DateTime!
  distanceKm: Float
  store: Store
  product: Product
  history(
    filters: HistoryDateRangeInput!
    pagination: PaginationInput
  ): InventoryHistoryConnection!
}

Fields

Inventory.id ● String! non-null scalar

Inventory.quantity ● Int! non-null scalar

Inventory.updatedAt ● DateTime! non-null scalar

Inventory.distanceKm ● Float scalar

Distance in kilometers from the query coordinates to the store (only populated when using geospatial filters with Product.inventories)

Inventory.store ● Store object

The store where this inventory is located

Inventory.product ● Product object

The product this inventory record refers to

Inventory.history ● InventoryHistoryConnection! non-null object

Get historical snapshots for this inventory. Returns records ordered by timestamp descending (most recent first).

Uses Relay-style pagination for proper complexity calculation.

⚠️ EXPERIMENTAL: This API is subject to change. Schema and behavior may evolve.

Inventory.history.filters ● HistoryDateRangeInput! non-null input

Date range and optional operation type filter

Inventory.history.pagination ● PaginationInput input

Pagination controls (default: first 100 records)

Member Of

InventoryEdge object