Duplicate Product and Update variant info with GraphQL

Hi!
I need to be able to duplicate a product but update the price of the one and only variant that the product has.

Currently I have to make the duplicate product mutation, wait for the response, then make a second mutation to update the product variant using the ID that is returned in the response of the first mutation.

Is this the only way to do this, or is there a way to be able to batch the calls?

Thanks!

Hey there,

It sounds to me like you’re doing this properly, I’m not aware of any way that you’d be able to perform both actions at the same time. You would need the product duplication to complete first so you could get the duplicate’s ID to use with an update.