Product creation cannot pass in inventoryQuantities variable

When creating a product and adding variants, a default variant will be generated because the type has been passed in. How can I pass in the status of inventoryQuantities when I create a product with only a single variant? Or is there a way to create a product without default creating variants?

Hello @user47,

I would take a look at the productSet mutation. If you don’t pass an ID to the input variables it acts similar to the productCreate mutation except that it:

  • Allows you specify the variants when creating the products (in your case you’ll only need one variant)
  • Has a inventoryQuantities field on the variants where you can set the quantities.

Best,
Daniel

The documentation of productVariantsBulkUpdate shows that the inventoryQuantities field can be transferred. But after I pass this field, the interface will not report an error, but the modification will be invalid. If the modification takes effect without passing the data in this field, what is the reason?