Using GraphQL's `productOptionsCreate` only adds the first option in `option.values`

Hey everyone,

I’m currently experimenting ways to optimize cost in our API that creates Shopify products externally.

I’m looking at the productOptionsCreate mutation but as I experimented on it by adding an option with multiple values, it creates the optionValues successfully, but when I look at options.values it only contains the first created option.

e.g.

  • I use productOptionsCreate to create an option named Size and add S, M, and L as values
  • The created options will look like this:
options: {
  values: [ "S"],
  optionValues: [{name: "S"}, {name: "M"}, {name: "L"}]
}

Is this a bug? Or does this mean I have to manually add the other options to the options.values field? That seems too much of a hassle and a waste of another call…

I am experiencing the same issue, while using productcreate mutation

Hey folks - from digging into this, it does seem that this is not a bug, but an intentional way that the API is set up. When creating a product option with multiple values, the optionValues field will correctly list all the values you specified, but the values field only includes the first value.