query GetBatchNumberInventoryLog($id: ID) {
BatchNumberInventoryLog(id: $id) {
id
on_hand
inventory_log { id }
batch_number { id }
}
}
query BatchNumberInventoryLogs(
$groupBy: QueryBatchNumberInventoryLogsGroupByGroupByClause,
$where: QueryBatchNumberInventoryLogsWhereWhereConditions,
$orderBy: [QueryBatchNumberInventoryLogsOrderByOrderByClause!]
) {
BatchNumberInventoryLogs(
groupBy: $groupBy
where: $where
orderBy: $orderBy
) {
id
on_hand
inventory_log { id }
batch_number { id }
}
}
{
"groupBy": {
"HAVING": [
{ "column": "ID", "value": 100012 }
]
},
"where": {
"AND": [
{ "column": "BATCH_NUMBER_ID", "operator": "EQ", "value": 100010 }
]
},
"orderBy": [
{ "column": "ON_HAND", "order": "DESC" }
]
}
| Field | Type | Description |
|---|
id | Int | Unique identifier of the batch number inventory log. |
on_hand | Float | Quantity on hand for this batch number in the inventory log. |
inventory_log | Object | Linked inventory log entity. |
batch_number | Object | Linked batch number entity. |
You can create filters based on following fields
| id - Int |
|---|
Example: { "column": "ID", "operator": "EQ", "value": 100012 } |
| on_hand - Float |
|---|
Example: { "column": "ON_HAND", "operator": "GT", "value": 50 } |
| inventory_log_id - ID |
|---|
Example: { "column": "INVENTORY_LOG_ID", "operator": "EQ", "value": 100001 } |
| batch_number_id - ID |
|---|
Example: { "column": "BATCH_NUMBER_ID", "operator": "EQ", "value": 100010 } |
You can sort data based on following fields: id, on_hand, inventory_log_id, batch_number_id
query SortBatchNumberInventoryLogs(
$where: QueryBatchNumberInventoryLogsWhereWhereConditions
) {
BatchNumberInventoryLogs(
where: $where
orderBy: [{ column: ON_HAND, order: DESC }]
) {
id
on_hand
inventory_log { id }
batch_number { id }
}
}
{
"data": {
"BatchNumberInventoryLogs": [
{
"id": 100001,
"on_hand": 150.5,
"inventory_log": { "id": 100001 },
"batch_number": { "id": 100010 }
},
{
"id": 100002,
"on_hand": 75.0,
"inventory_log": { "id": 100002 },
"batch_number": { "id": 100011 }
}
]
}
}