Error Performing productSet Mutation with Video IDs in mediaIds Field

Error Performing productSet Mutation with Video IDs in mediaIds Field

Shopify Partner
25 0 11

Hello there,


I am trying to figure out an error returned by Shopify while trying to create/update a product with videos.


Our integration uses the `productSet` mutation that's part of the 2024-07 API version to create and update products (docs here) .

Along with some other product fields (such as title and description), we also include the `mediaIds` as part of the `productSet` mutation. The `mediaIds` we send includes an array with a video id (e.g. `["gid://shopify/Video/:id"]`).

I double checked the docs, the video id and the mutation and everything seems to be correct. However, Shopify returns an `invalid id` error. If I replace the video id with a media image id it works as expected.


My question is - does the `productSet` mutation support video ids as part of the `mediaIds` field?

Here is the whole response from Shopify:


  "errors": [
      "message": "invalid id",
      "locations": [
          "line": 2,
          "column": 3
      "path": [
  "data": {
    "productSet": null
  "extensions": {
    "cost": {
      "requestedQueryCost": 11,
      "actualQueryCost": 1,
      "throttleStatus": {
        "maximumAvailable": 2000,
        "currentlyAvailable": 1999,
        "restoreRate": 100


Thanks a lot


Reply 1 (1)

Shopify Partner
1 0 1

Hey @JustinKillian, I tried using productSet in the Shopify GraphQL App (2024-07, 2024-10 and unstable) and got the same response. The docs didn't mention any types for mediaIds, so not sure if this is a bug or if the docs need to be updated. 


I wondered if adding a Video using the Shopify hosted url with the productUpdate mutation would work but that didn't work either.


ProductSet mutation:


Screenshot 2024-07-10 at 02.22.11.png

Screenshot 2024-07-10 at 02.28.05.png


ProductUpdate mutation:


Screenshot 2024-07-10 at 03.12.53.png

Screenshot 2024-07-10 at 03.30.26.png

Screenshot 2024-07-10 at 03.14.57.png