New Product Model

Topic summary

A developer is experiencing an issue with Shopify’s productVariantsBulkCreate mutation where the default variant is always being replaced when creating new variants, regardless of the strategy argument used.

Attempted Solutions:

  • Tried different strategy values
  • Used productSet mutation
  • Created productOptions before variants

Current Behavior:
The default variant gets replaced instead of being preserved alongside the new variant.

Technical Details:

  • Using GraphQL API version 2024-07
  • Mutation: productVariantsBulkCreate with strategy: DEFAULT
  • Creating variants with custom option values (e.g., “Temporary testing 1”)

Response:
Another user noted that there is no ADD strategy available for this mutation.

Status: The issue remains unresolved, with the developer seeking a way to preserve the default variant while adding new ones.

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

I’m working on a POS app, which creates variants for products, many times the original product only has the default variant.

Problem: no matter what I pass to the “strategy” argument, looks like it’s always replacing the default variant, I tried many things like using productSet or even creating the productOptions before creating the variants, and the default variant always get replaced by the new one.

CURL with the mutation to create the new variant:

curl --location --request POST ‘https://SHOP.myshopify.com/admin/api/2024-07/graphql.json
–header ‘X-Shopify-Access-Token: TOKEN’
–header ‘Content-Type: application/json’
–data-raw ‘{“query”:“mutation ProductVariantsCreate($productId: ID!, $variants: [ProductVariantsBulkInput!]!) {\n productVariantsBulkCreate(productId: $productId, variants: $variants, strategy: DEFAULT) {\n productVariants {\n id\n title\n selectedOptions {\n name\n value\n }\n }\n userErrors {\n field\n message\n }\n }\n}”,“variables”:{“productId”:“PRODUCT_ID”,“variants”:[{“price”:10,“compareAtPrice”:0.01,“optionValues”:[{“name”:“Temporary testing 1”,“optionName”:“Title”}]}]}}’

There is no ADD strategy.