Product Options Reorder User Error
Requires access scope.
Error codes for failed mutation.
Anchor to FieldsFields
- Anchor to codecode•Product
Options Reorder User Error Code The error code.
- Anchor to fieldfield•[String!]
The path to the input field that caused the error.
- Anchor to messagemessage•String!non-null
The error message.
Anchor to MutationsMutations
- •mutation
Reorders options and option values on a product, causing product variants to alter their position.
Options order take precedence over option values order. Depending on the existing product variants, some input orders might not be achieved.
Example: Existing product variants: ["Red / Small", "Green / Medium", "Blue / Small"].
New order: [ { name: "Size", values: [{ name: "Small" }, { name: "Medium" }], name: "Color", values: [{ name: "Green" }, { name: "Red" }, { name: "Blue" }] } ].
Description: Variants with "Green" value are expected to appear before variants with "Red" and "Blue" values. However, "Size" option appears before "Color".
Therefore, output will be: ["Small / "Red", "Small / Blue", "Medium / Green"].
- Anchor to optionsoptions•[Option
Reorder Input!]!required Options to reorder on the product.
- Anchor to productIdproduct•ID!required
Id The ID of the product to update.
Arguments
- Anchor to productproduct•Product
The updated product object.
- Anchor to userErrorsuser•[Product
Errors Options Reorder User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields