We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

productVariantCreate creates two variants instead to just one

productVariantCreate creates two variants instead to just one

kyoe
Shopify Partner
1 0 0

Hi, 

 

I am using the graphql endpoint in order to create one variant for my product. The product is unique, no I dont need anything else.

The call is basically:

 

{"query": "mutation productVariantCreate($input: ProductVariantInput!) {productVariantCreate(input: $input) {productVariant { id } userErrors { field message }}}", "variables":{"input" : {"productId" : "gid://shopify/Product/7714902868143"  , "inventoryItem": {"cost": 1,"tracked": true} ,"price": 1,  "options": ["Variant 1234567890-gid://shopify/Product/7714902868143"], "sku": "1234567890" } }}

 

Options field is just a proof of concept, so I will change in the future. The call is ok and returns a variant, however, in the shopify admin console I see two, one called Default Title.
Any reason about? any way to have one variant for one product?

 

Thanks

Replies 0 (0)