# currentStocks

Audience: Developer

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

## Arguments

| Name | Type |
| --- | --- |
| `after` | [Cursor](https://docs.pyck.cloud/api/scalars/cursor.md) |
| `first` | Int |
| `before` | [Cursor](https://docs.pyck.cloud/api/scalars/cursor.md) |
| `last` | Int |
| `orderBy` | [StockOrder](https://docs.pyck.cloud/api/inputs/stockorder.md) |
| `where` | [StockWhereInput](https://docs.pyck.cloud/api/inputs/stockwhereinput.md) |

## Returns

[StockConnection](https://docs.pyck.cloud/api/types/stockconnection.md)!

## Example

Returns the first 10 current stock rows, which are the latest row for each repository and item pair.

```graphql
query GetCurrentStocks($after: Cursor, $first: Int, $before: Cursor, $last: Int, $orderBy: StockOrder, $where: StockWhereInput) {
  currentStocks(after: $after, first: $first, before: $before, last: $last, orderBy: $orderBy, where: $where) {
    totalCount
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    edges {
      cursor
      node {
        createdAt
        createdBy
        deletedAt
        deletedBy
        id
        incomingStock
        itemID
        movementID
        outgoingStock
        ownIncomingStock
        ownOutgoingStock
        ownQuantity
        quantity
        repositoryID
        tenantID
        updatedAt
        updatedBy
        version
      }
    }
  }
}
```

**Variables**

```json
{
  "first": 10
}
```
