Media User Error
Represents an error that happens during execution of a Media query or mutation.
Anchor to FieldsFields
- Anchor to codecode•Media
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 media attached to a product, changing their sequence in product displays. The operation processes asynchronously to handle products with large media collections.
Specify the product ID and an array of moves, where each move contains a media ID and its new zero-based position.
NoteOnly include media items that need repositioning. Unchanged items maintain their relative order automatically.
The mutation returns a
Jobto track the reordering progress. Poll the job status to determine when the operation completes and media positions update across all sales channels.Learn more about reordering product media.
- •ID!required
The ID of the product on which to reorder medias.
- Anchor to movesmoves•[Move
Input!]! required A list of moves to perform which will be evaluated in order.
Arguments
- •ID!
- •mutation
Appends existing media from a product to specific variants of that product, creating associations between media files and particular product options. This allows different variants to showcase relevant images or videos.
For example, a t-shirt product might have color variants where each color variant displays only the images showing that specific color, helping customers see exactly what they're purchasing.
Use
to:- Associate specific images with product variants for accurate display
- Build variant-specific media management in product interfaces
- Implement automated media assignment based on variant attributes
The operation links existing product media to variants without duplicating files, maintaining efficient media storage while enabling variant-specific displays.
Learn more about product variants.
- Anchor to productIdproduct•ID!
Id required Specifies the product associated to the media.
- Anchor to variantMediavariant•[Product
Media Variant Append Media Input!]! required A list of pairs of variants and media to be attached to the variants.
Arguments
- •mutation
Detaches media from product variants.
- Anchor to productIdproduct•ID!
Id required Specifies the product to which the variants and media are associated.
- Anchor to variantMediavariant•[Product
Media Variant Detach Media Input!]! required A list of pairs of variants and media to be deleted from the variants.
Arguments
Deprecated mutations
- •mutationDeprecated
- Anchor to productIdproduct•ID!
Id required Specifies the product associated with the media.
- Anchor to mediamedia•[Create
Media Input!]! required List of new media to be added to a product.
Arguments
- •mutationDeprecated
- Anchor to productIdproduct•ID!
Id required Specifies the product ID from which the media will be deleted.
- Anchor to mediaIdsmedia•[ID!]!
Ids required The media IDs to be deleted.
Arguments
- •mutationDeprecated
- Anchor to productIdproduct•ID!
Id required Specifies the product on which media will be updated.
- Anchor to mediamedia•[Update
Media Input!]! required A list of media updates.
Arguments