GraphQL set inventory if product is not tracking stock

Good morning,

I noticed that the GraphQL inventorySetQuantities mutation does not return an error if setting the quantity on an inventory item which is not tracking its stock (there’s no error but still the quantity is not updated).
However, doing the same with the REST endpoint inventory_levels/set.json returns an 422 Unprocessable Content error saying that Inventory item does not have inventory tracking enabled.
Is this by design so? Is there a way to trigger the error with the GraphQL mutation?

Thank you!
Piotr

1 Like

Hey @Piotr_Wojcicki :waving_hand: - thanks for mentioning this here - I was able to replicate the behaviour in GraphQL that you’re seeing on my end here as well, that is odd. I’ll do some more digging into this to see if this is expected or something we can triage as an issue/feature request and loop back with you when I have some more info to share.

Hey again @Piotr_Wojcicki - just following up here. We’re digging into this further and treating it as a possible issue on our end. Can’t guarantee turnaround time, but I’ll post here when I have confirmation in terms of it being a possible bug/next steps - thanks again for reporting this :slight_smile:

Hey @Piotr_Wojcicki :waving_hand: - just following up again with you here. I was able to investigate this further on my end and can confirm that this is currently expected behaviour.

That said, we do definitely recognize that it’s not the most intuitive and we can for sure improve the performance of the mutations.

I’ve set a feature request report so that we can track this as a possible future enhancement to work further on. I can’t guarantee anything specifically, but in the past I’ve seen feature requests I’ve created get implemented in releases, so that does happen in many cases.

Hope this helps - let me know if I can clarify anything on my end here, happy to help out further!