API version: unstable
API version: 2021-07 Release candidate
API version: 2021-04 Latest
API version: 2021-01
API version: 2020-10
API version: 2020-07
API version: 2020-04
API version: 2020-01 Unsupported
API version: 2019-10 Unsupported

productVariantDetachMedia mutation

Version unstable

Deletes media from product variants.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
productId ( ID! ) required

Specifies the product to which the variants and media are associated.

variantMedia ( [ProductVariantDetachMediaInput!]! ) required

A list of pairs of variants and media to be deleted from the variants.

ProductVariantDetachMediaInput fields

  • mediaIds ([ID!]!) Required

    Specifies the media to detach from the variant.

  • variantId (ID!) Required

    Specifies the variant from which media will be detached.

Return fields

  • product (Product)

    The product associated with the variants and media.

  • productVariants ([ProductVariant!])

    The product variants that were updated.

  • userErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

Version 2021-07 (Release candidate)

Deletes media from product variants.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
productId ( ID! ) required

Specifies the product to which the variants and media are associated.

variantMedia ( [ProductVariantDetachMediaInput!]! ) required

A list of pairs of variants and media to be deleted from the variants.

ProductVariantDetachMediaInput fields

  • mediaIds ([ID!]!) Required

    Specifies the media to detach from the variant.

  • variantId (ID!) Required

    Specifies the variant from which media will be detached.

Return fields

  • product (Product)

    The product associated with the variants and media.

  • productVariants ([ProductVariant!])

    The product variants that were updated.

  • userErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

Version 2021-04 (Latest)

Deletes media from product variants.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
productId ( ID! ) required

Specifies the product to which the variants and media are associated.

variantMedia ( [ProductVariantDetachMediaInput!]! ) required

A list of pairs of variants and media to be deleted from the variants.

ProductVariantDetachMediaInput fields

  • mediaIds ([ID!]!) Required

    Specifies the media to detach from the variant.

  • variantId (ID!) Required

    Specifies the variant from which media will be detached.

Return fields

  • product (Product)

    The product associated with the variants and media.

  • productVariants ([ProductVariant!])

    The product variants that were updated.

  • userErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

Version 2021-01

Deletes media from product variants.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
productId ( ID! ) required

Specifies the product to which the variants and media are associated.

variantMedia ( [ProductVariantDetachMediaInput!]! ) required

A list of pairs of variants and media to be deleted from the variants.

ProductVariantDetachMediaInput fields

  • mediaIds ([ID!]!) Required

    Specifies the media to detach from the variant.

  • variantId (ID!) Required

    Specifies the variant from which media will be detached.

Return fields

  • product (Product)

    The product associated with the variants and media.

  • productVariants ([ProductVariant!])

    The product variants that were updated.

  • userErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.

Version 2020-10

Deletes media from product variants.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
productId ( ID! ) required

Specifies the product to which the variants and media are associated.

variantMedia ( [ProductVariantDetachMediaInput!]! ) required

A list of pairs of variants and media to be deleted from the variants.

ProductVariantDetachMediaInput fields

  • mediaIds ([ID!]!) Required

    Specifies the media to detach from the variant.

  • variantId (ID!) Required

    Specifies the variant from which media will be detached.

Return fields

  • product (Product)

    The product associated with the variants and media.

  • productVariants ([ProductVariant!])

    The product variants that were updated.

  • userErrors ([MediaUserError!]!)

    List of errors that occurred executing the mutation.