getStockTree
Since pyck v0.27.0
Served by: inventory
Arguments
Section titled “Arguments”| Name | Type | Default | Description |
|---|---|---|---|
after |
Cursor | ||
first |
Int | ||
before |
Cursor | ||
last |
Int | ||
where |
StockWhereInput |
Returns
Section titled “Returns”Example
Section titled “Example”Returns the first 3 stock entries as a hierarchical tree, showing stock levels per repository including child repositories.
query GetStockTree($after: Cursor, $first: Int, $before: Cursor, $last: Int, $where: StockWhereInput) { getStockTree(after: $after, first: $first, before: $before, last: $last, where: $where) { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { cursor node { children { cursor node { children { cursor } createdAt parentID repositoryID stocks { createdAt createdBy deletedAt deletedBy id incomingStock itemID movementID outgoingStock ownIncomingStock ownOutgoingStock ownQuantity quantity repositoryID tenantID updatedAt updatedBy version } } } createdAt parentID repositoryID stocks { createdAt createdBy deletedAt deletedBy id incomingStock itemID movementID outgoingStock ownIncomingStock ownOutgoingStock ownQuantity quantity repositoryID tenantID updatedAt updatedBy version } } } }}Variables
{ "first": 3, "where": { "createdAtGTE": "2023-10-17T00:00:00Z" }}