A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
The Shopify GraphQL Admin API is becoming more efficient, and one feature I find particularly useful is the ProductSet mutation. It allows me to create or update products and their variants all at once, including prices and inventory levels per inventory location.
However, the API lacks a feature to toggle inventory tracking for multiple products at once. Although there is an inventoryBulkToggleActivation mutation, it only allows toggling inventory tracking for multiple locations, but for a single variant at a time.
It's a bit confusing that Shopify enables inventory updates across multiple locations through the ProductSet mutation, yet doesn’t provide a similar bulk toggle for inventory tracking.
Is there any other way to enable inventory tracking via the GraphQL Admin API, other than sending individual API requests to toggle inventory tracking for each variant?
I am curious about this as well. It seems like we should be able to bulk activate inventory (Toggle the `Track quantity`) checkbox via the admin graphql API. I hope the engineers are working on something, I can add media, variants, and variant inventory quantities now with the `productSet` mutation a huge plus. Just not able to toggle track quantity.
After digging into it a bit more it turns out you can use the `productVariantsBulkUpdate` mutation to update the `InventoryItemInput` and set the field `tracked` to `true` and `BulkOperations` supports the `productVariantsBulkUpdate` mutation. I will give it a shot tomorrow and let you know how it goes.
Thank you. I will try this also 🙂
Can confirm its works great!