inventoriesCount
Requires at least one of the permissions inventory:stock_level:list or inventory:stock_level:read.
Returns how many inventory rows match the same filter as inventories, ignoring paging, for a pager. Needs the stock level read or list permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query InventoriesCount {
inventoriesCount
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query InventoriesCount {\n inventoriesCount\n}"
}
EOF
Response:
{
"data": {
"inventoriesCount": 0
}
}
inventoriesCount(
filter: InventoryFilterInput
): Int!
Arguments
inventoriesCount.filter ● InventoryFilterInput input
Optional filters. The same ones as inventories.
Type
Int scalar
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.