I’m building an app that will allow us to transfer a product from available to one of the unavailable categories but first we just want to get quantities. I have some code that seems pretty simple but it doesn’t return anything. See below:
query ProductInventoryQuantities($productId: ID!, $locationId: ID!) {
product(id: $productId) {
id
title
variants(first: 100) {
edges {
node {
id
title
sku
inventoryItem {
id
inventoryLevel(locationId: $locationId) {
quantities(names: ["unavailable", "on_hand", "committed"]) {
name
quantity
}
updatedAt
}
}
}
}
}
}
}
Inputting:
{
"productId": "gid://shopify/Product/xxxxxxxxxx8624",
"locationId": "gid://shopify/Location/xxxxxxx4304"
}
I’m not getting an error, just “null” and the cost info.
Any suggestions would be VERY welcome!