ProductVariantCreate - creating only 1 variant, also creates a default one - GraphQL

Topic summary

Issue: Creating a single variant via productVariantCreate also generates a “Default Title” variant, leaving two variants instead of one.

Suggested fix: Use productVariantsBulkCreate with strategy REMOVE_STANDALONE_VARIANT to remove the implicit default variant when adding variants.

Problem encountered: bulk create returned errors like “You need to add option values for Title” or “option does not exist” when the product had no pre-defined options. This indicates option values must exist on the product before bulk variant creation; the mutation did not create options implicitly.

Workable approaches confirmed by OP:

  • Approach 1: Product Create → Variant Create → Query variants → Delete the “Default Title” variant.
  • Approach 2: Product Create (with an option defined) → Product Variant Update → Inventory quantities update.

Guidance: A staff reply suggested supplying options at product creation, then updating the variant to the desired state.

Status: OP is unblocked using the above approaches. An open question remains from other users: can options be created within productVariantsBulkCreate? No definitive answer provided in the thread.

Summarized with AI on December 16. AI used: gpt-5.

HI,there

you could run the productVariantsBulkCreate mutation with a strategy of REMOVE_STANDALONE_VARIANT and only create one vairant.

mutation productVariantsBulkCreate {
  productVariantsBulkCreate(
    productId: "gid://shopify/Product/1234",
    strategy: REMOVE_STANDALONE_VARIANT,
    variants: [
      # Variants to be created
    ]
  )
}