productVariantAppendMedia mutation
Appends media from a product to variants of the product.
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 associated to the media. |
variantMedia
(
[ProductVariantAppendMediaInput!]!
)
required
|
A list of pairs of variants and media to be attached to the variants. |
ProductVariantAppendMediaInput fields
-
mediaIds (
[ID!]!
) RequiredSpecifies the media to append to the variant.
-
variantId (
ID!
) RequiredSpecifies the variant to which media will be appended.
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.
Appends media from a product to variants of the product.
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 associated to the media. |
variantMedia
(
[ProductVariantAppendMediaInput!]!
)
required
|
A list of pairs of variants and media to be attached to the variants. |
ProductVariantAppendMediaInput fields
-
mediaIds (
[ID!]!
) RequiredSpecifies the media to append to the variant.
-
variantId (
ID!
) RequiredSpecifies the variant to which media will be appended.
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.
Appends media from a product to variants of the product.
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 associated to the media. |
variantMedia
(
[ProductVariantAppendMediaInput!]!
)
required
|
A list of pairs of variants and media to be attached to the variants. |
ProductVariantAppendMediaInput fields
-
mediaIds (
[ID!]!
) RequiredSpecifies the media to append to the variant.
-
variantId (
ID!
) RequiredSpecifies the variant to which media will be appended.
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.
Appends media from a product to variants of the product.
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 associated to the media. |
variantMedia
(
[ProductVariantAppendMediaInput!]!
)
required
|
A list of pairs of variants and media to be attached to the variants. |
ProductVariantAppendMediaInput fields
-
mediaIds (
[ID!]!
) RequiredSpecifies the media to append to the variant.
-
variantId (
ID!
) RequiredSpecifies the variant to which media will be appended.
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.