Old versions of the Shopify GraphQL productCreate
mutation seemingly offered a variants
field where you could set the price of the product you were creating.
The latest version as of writing this (2024-10) does not seem to have this option.
Is there a way to create a basic product with only one variant (or no variants!) and set a price in a single operation?
And if it must be done in two operations? What is the correct second mutation?
productVariantsBulkCreate
seems like a likely option, but the "bulk" word in the name makes me think there is probably a simpler mutation. But that seems to be the only mutation that lets you create a price.@CleverPatrick , We need to follow these steps:
First, create a product for ID, then add a variant with price, though productVariantsBulkCreate is preferred even for single variants.