I’ve noticed this mutation “inventoryBulkAdjustQuantityAtLocation” is deprecated.
I’ve also seen Shopify agents recommending it’s use on here as recent as 2 months ago.
Should I be avoiding using this? If so, is there an alternative?
Cheers!
Hey @jason3w ,
Thanks for your post!
Indeed the “inventoryBulkAdjustQuantityAtLocation” has been deprecated and you can review this changelog detailing the change and the suggested replacement.
Hope that helps!
Thanks
Hi there,
I’ve been using the suggested replacement now.
It’s returning an error now even though the rate looks ok and the query cost is not too high. I was running it with no limit to the number of products I was updating and got the error. I then reduced to limit it to 20 items. It ran fine for 4 runs, then I had the same error.
I limited it to 10 and it ran once. Then I limited it to 4 and it ran twice more.
I’ve waited 5 minutes and tried again but got the same error. The response I’m getting is below.
Is there a way to know what the issue is more specifically? I assume it’s a rate limit due to what I described above. Anything else it could be, or a way to get better insight into the issue?
I’m wondering if instead of trying to update an array of products, I should be updating one at a time in case there is an issue with a single product that has the query fail and therefore updates nothing. In this case my question would be about the query cost. Would a single item mutation cost be 1 10th of updating 10 items?
Hi @jason3w ,
We can’t offer authenticated support here or provide insights on what error you were seeing without examples or replication steps.
If your app was being throttled, and the errors aren’t related to the formatting of the inventoryAdjustQuantities mutation, then reducing the amount of changes in each request should help.
The GraphQL Admin API cost for a single change probably won’t be exactly a tenth of the cost of an adjustment with 10 times the changes. Each mutation and connection your app runs has a base cost, then the rest of the calculated cost is based on the sum of the fields returned. There’s more details on the process in our dev docs.
Hope that helps.
Hi, in your changelog you are advising to use inventoryAdjustQuantities now.
But can we pass 1000 changes?
Because, with a bulk we could do whatever we want
I implemented https://shopify.dev/docs/api/admin-graphql/2024-07/mutations/inventoryAdjustQuantities for just one record at a time.
Which is a step backwards.. but I could easily send multiple values if that is supported.
Will check.