With the following query:
query {
warehouse_products {
data {
edges {
node {
id
}
}
}
}
}
I get the response “Unexpected Error”.
{
"errors": [
{
"message": "Unexpected Error",
"operation": "warehouse_products",
"field": "data",
"request_id": "5f345c8250b9b763f2604ac6",
"code": 22
}
],
"data": {
"warehouse_products": {
"data": null
}
}
}
If I try to request a few more fields, such as the quantity available (the rest of the query is the same):
node {
id
available
}
The error changes, and instead it tells me that there are not enough credits to perform this action. The stated cost is 3001, which is beyond the global cap, so it appears that this operation cannot be invoked.
{
"errors": [
{
"code": 30,
"message": "There are not enough credits to perfom the requested operation, which requires 3001 credits, but the are only 1001 left. In 0:02:14 minutes you will have enough credits to perform the operation",
"operation": "warehouse_products",
"request_id": "5f345ca681e74a69682bac6d",
"required_credits": 3001,
"remaining_credits": 1001,
"time_remaining": "0:02:14 minutes"
}
],
"data": {
"warehouse_products": null
}
}
Obviously the error in the first example is some kind of bug, but what about the second? Is it correct behavior that we simply can’t ask the warehouse_products
query for anything other than id
and sku
?