A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I'm trying to simplify how we handle locations on our store.
Currently, we have 3 possible locations for products - 2 'app' locations and a shopify location.
I'm trying to move all products onto a single app location through graphql.
I've tried using the productVariantUpdate mutation and sending through just the variant id, and inventoryQuantities set with available quantity and location id.
This returns no errors but changes nothing
any ideas? I can't see anything anywhere in the docs that suggest an alternate way of doing this
Hi @Simon20 👋
The `inventoryQuantities` in the `productUpdateVariant` docs highlight that this particular field is meant to be used as an input to the `productVariantCreate` mutation. In order to modify the inventory, we will need to use the `inventoryAdjustQuantity` mutation (or `inventoryBulkAdjustQuantityAtLocation`) on the Inventory object directly. There is a great breakdown of the relationships between the inventory resources here as well.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog