GraphQL API: Timeout issues with productCreate for products with many variants

New Member
2 0 1


So i have a problem.... hopefully some of you can assist.

I need to create a product on a store, and I was doing this using the productCreate mutation. I would need to create a single product, with as many as 75 variants. I would also be creating metafields for the variants and hence returning this data too per variant. We ran into issues where we had timeouts from Shopify. Further investigation shows that their stored procs can take too long for a lot of information and therefore would time out. Adding retry logic did help somewhat due to the caching on their side.

However, we still had timeout issues. This is quite problematic for the application we are building.

I therefore adopted a new approach to first create the product, then use the productUpdate mutation to update its variants (and images) in batches of 10 (for example). This worked...only to realise that the productUpdate mutation does not append current data, but rewrites the product data.

The last resort I can think of is to create the product with all its images, latch onto the image Ids and src fields. Then create the variants one by one with productVariantCreate (by using imageId from productCreate). This can work but we are now doing a single variant at a time.... All this to avoid timeouts.

Can anybody please advise on if they have encountered this? And if they have solutions to bulk variant creation on an existing product?

Thank you!

1 Like
New Member
1 0 0

Chiming in to say I've encountered this issue as well, and on products with variants as low as 46. Were you able to figure out anything further in regards to a solution or workaround? I had considered the single variant upload as well, but wasn't too keen on that at all...