Unable to update image positions using GraphQL mutation

Topic summary

A user is experiencing issues updating image positions for Shopify products via GraphQL mutations.

What’s Working:

  • Successfully updating images using the productImageUpdate mutation

The Problem:

  • The productReorderMedia mutation is not reordering images or updating their positions as expected

Details Provided:
The user shared their mutation and input variables (though the code appears corrupted/reversed in the post), which includes:

  • Mutation: productUpdateMedia
  • Variables with fields for id, newPosition, and moves

Status:
The question remains unanswered - the user is seeking help to resolve why the reordering functionality isn’t working despite following the expected mutation structure.

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

Hi Team,

I am trying to update the images for Shopify products and trying to update those images with certain positions.

I was able to update the image using the “productImageUpdate” mutation.

I tried using the “productReorderMedia” mutation, but it is not updating the positions or reordering the images.

Can anyone help me with this?

Below is the sample query and mutation I am using.

Mutation -

mutation productUpdateMedia($media: [UpdateMediaInput!]!, $productId: ID!) {
productUpdateMedia(media: $media, productId: $productId) {
media {
alt
}
}
}

Input Variables -

{
“id”: “”,
“moves”: [
{
“id”: “”,
“newPosition”: “”
}
]
}

Best Regards,

Prajakta