GraphQL Products + Variations

Topic summary

A developer is migrating Shopify integrations from the deprecated REST API to GraphQL Admin API and encountering issues updating product variants.

The Problem:

  • Can successfully create simple products (single variation) and retrieve the default variant ID
  • Unable to update the variant’s SKU and price using productVariantsBulkUpdate mutation

Suggested Solutions:

  1. Provide more details - Include actual code, API responses, and error messages for effective troubleshooting

  2. Check the allowPartialUpdates flag - This parameter on productVariantsBulkUpdate may be relevant to the issue

  3. SKU update location - SKU must be updated through the inventoryItem property of productVariant, not directly on the variant itself

  4. Consider productSet mutation - Alternative approach that handles product updates differently to avoid data loss

Status: The discussion remains open with community members providing guidance, though the original poster hasn’t confirmed whether the solutions resolved their issue.

Summarized with AI on October 23. AI used: claude-sonnet-4-5-20250929.

Hi All,

We have been building integrations between Shopify and Financial programs for a couple of years now using the REST API.
Due to the REST API being deprecated we now want to move to GraphQL Admin API.

We try to create just “simple” products so products with 1 variation. I’ve been cracking my head over it because for some reason, I can make the product (without also giving the variation details), get de default variant ID that has been added to the product.

But then it stops, i want to update it so i can set the correct SKU and prijs. I’ve found the productvariantsbulkupdate but for some reason i can’t update the SKU with it.

Some help would be appreciated!

Kind Regards,
Pim Dröge
improvit

Hi @improvit :waving_hand: unfortunately without seeing any actual code, or responses, or errors, etc.
Your making others be mind readers swinging in the dark.
Improve your troubleshooting communication e.g. https://stackoverflow.com/help/how-to-ask or even How To Ask Questions The Smart Way
or provide an minimal reproducible example

For development hurdles, or bugs, use the actual dev forums now, there’s even a chance of actual response from shopify staff for some issues :clap: .


Be aware of the allowPartialUpdates flag on the productVariantsBulkUpdate mutation

Also see productSet mutation, know the differences to not nuke data.


Though as you may be suspecting, yes graphql is even now still a hot mess

SKU updated as pasrt of inventoryItem property of the productVariant: