# inventoryItems

Audience: Developer

**Served by:** [inventory](https://docs.pyck.cloud/api/services/inventory.md)

## Arguments

| Name | Type | Description |
| --- | --- | --- |
| `after` | [Cursor](https://docs.pyck.cloud/api/scalars/cursor.md) | Returns the elements in the list that come after the specified cursor. |
| `first` | Int | Returns the first _n_ elements from the list. |
| `before` | [Cursor](https://docs.pyck.cloud/api/scalars/cursor.md) | Returns the elements in the list that come before the specified cursor. |
| `last` | Int | Returns the last _n_ elements from the list. |
| `orderBy` | [InventoryItemOrder](https://docs.pyck.cloud/api/inputs/inventoryitemorder.md) | Ordering options for InventoryItems returned from the connection. |
| `where` | [InventoryItemWhereInput](https://docs.pyck.cloud/api/inputs/inventoryitemwhereinput.md) | Filtering options for InventoryItems returned from the connection. |

## Returns

[InventoryItemConnection](https://docs.pyck.cloud/api/types/inventoryitemconnection.md)!

## Example

Returns the 3 most recently created inventory items.

```graphql
query GetInventoryItems($after: Cursor, $first: Int, $before: Cursor, $last: Int, $orderBy: InventoryItemOrder, $where: InventoryItemWhereInput) {
  inventoryItems(after: $after, first: $first, before: $before, last: $last, orderBy: $orderBy, where: $where) {
    totalCount
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    edges {
      cursor
      node {
        createdAt
        createdBy
        currentStockTotals {
          lastChangedAt
          quantity
        }
        data
        dataTypeID
        dataTypeSlug
        deletedAt
        deletedBy
        id
        sku
        tenantID
        updatedAt
        updatedBy
      }
    }
  }
}
```

**Variables**

```json
{
  "first": 3,
  "orderBy": {
    "direction": "DESC",
    "field": "CREATED_AT"
  },
  "where": {
    "createdAtGTE": "2023-10-17T00:00:00Z"
  }
}
```
