Skip to content
Saleor
Esc
↑↓navigate↵open⌘Jpreview

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

variantMediaAssign Mutation

Assign an media to a product variant.

Requires one of the following permissions:MANAGE_PRODUCTS
variantMediaAssign(mediaId: ID!, variantId: ID!): VariantMediaAssign

Returns

VariantMediaAssign

Show return type
type VariantMediaAssign {
  productVariant: ProductVariant
  media: ProductMedia
  productErrors: [ProductError!]! @deprecated(reason: "Use `errors` field instead.")
  errors: [ProductError!]!
}

Arguments

mediaId

mediaId · ID!

ID of a product media to assign to a variant.

variantId

variantId · ID!

ID of a product variant.


Schema: Saleor 3.23.43. Download SDL.

Last updated on April 13, 2026

Was this page helpful?