Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Reporting a bug in productReorderMedia graphql mutation

Reporting a bug in productReorderMedia graphql mutation

rko_tilt
New Member
8 0 0

According to documentation, productReorderMedia endpoint variables are defined as following:/

input MoveInput {
id: ID!
newPosition: UnsignedInt64!
}

but when sending unsigned integer, the resopnse is:

 


Variable $moves of type [MoveInput!]! was provided invalid value for 0.newPosition (UnsignedInt64 '1' must be encoded as a string), 1.newPosition (UnsignedInt64 '2' must be encoded as a string)

So there is a mismatch, documentation says it needs integer, but server responds saying that it needs string.
When sending string, i get resopnse with no errors, but order of media objects is not changed.

PS.
I couldn't find a proper channel for reporting a bug so im writing here

Replies 3 (3)

Liam
Community Manager
3108 344 910

Hi Rko_tilt,

 

Thanks for flagging this - I'll connect with our API development team on this and report back asap!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

rko_tilt
New Member
8 0 0

Hey @Liam,
Thanks for passing the issue further.
Is there some kind of estimation maybe of when the team plans to release a fix?

363518457
Shopify Partner
23 0 5

hello,

 

I submitted the request successfully using the following parameters and interfaces. However, the order of the pictures did not change. How can I solve this problem?

 

mutation productReorderMedia($id: ID!, $moves: [MoveInput!]!) {
productReorderMedia(id: $id, moves: $moves) {
job {
id
}
}
}
 

Input variables:

{
"id":"gid://shopify/Product/***",
"moves":[
{"id":"gid://shopify/MediaImage/***","newPosition":"1"},
{"id":"gid://shopify/MediaImage/***","newPosition":"2"},
{"id":"gid://shopify/MediaImage/***","newPosition":"3"},
{"id":"gid://shopify/MediaImage/***","newPosition":"4"}
]
}