Skip to main content
Anchor to ProductOptionsDeletePayload

ProductOptionsDeletePayload

payload

Return type for productOptionsDelete mutation.

•[ID!]

IDs of the options deleted.

•Product

The updated product object.

•[ProductOptionsDeleteUserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?

Anchor to Mutations with this payloadMutations with this payload

•mutation

Deletes one or more options from a product. Product options define the choices available for a product, such as size, color, or material.


Caution

Removing an option can affect a product's variants and their configuration. Deleting an option might also delete associated option values and, depending on the chosen strategy, might affect variants.


Use the productOptionsDelete mutation for the following use cases:

  • Simplify product configuration: Remove obsolete or unnecessary options (for example, discontinue "Material" if all variants are now the same material).
  • Clean up after seasonal or limited-time offerings: Delete options that are no longer relevant (for example, "Holiday edition").
  • Automate catalog management: Enable apps or integrations to programmatically remove options as product data changes.

Note

The productOptionsDelete mutation enforces strict data integrity for product options and variants. All option positions must remain sequential, and every remaining option must be used by at least one variant.


After you delete a product option, you can further manage a product's configuration using related mutations:

Learn more about the product model and adding product data.


Was this section helpful?