A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Trying to set 'on_hand' value using 'InventorySetOnHandQuantities' on a newly created Product.
I have tried using [REST]: '/inventory_levels/set.json' before calling the [GraphQL]: 'InventorySetOnHandQuantities'
which returns null, but when I try [REST]: '/inventory_levels/connect.json' before calling the [GraphQL]: 'InventorySetOnHandQuantities' it works?
In the documents for [REST]: '/inventory_levels/set.json' it says 'If the specified location is not connected, it will be automatically connected first'.
It says it automatically connects first then isn't this supposed to work?
Or will it be better to use [REST]: '/inventory_levels/connect.json'?
Found out that there were no change to the quantity which was causing the error.
So quantity from [REST]: '/inventory_levels/set.json' = 10 but tried to do [GraphQL]: 'InventorySetOnHandQuantities' = 10 causes error