Graphql orderUpdate docs example not working

Solved
ValentinMercier
Tourist
10 1 0

Hello There ! 

Not the first time I'm struggling with GraphQL I'm still trying but I begin to feel tired of the poor documentation and the bad error return. 

I'm trying to make the example of orderUpdate mutation working : 

First I retrieve an order  :

Screenshot 2020-12-16 at 11.07.25.png

 

Second I try to modify the order with the example code of the doc :

Screenshot 2020-12-16 at 11.09.13.png

 

I don't want to sound to critical because the support is good at Shopify but GraphQL is really bad documented and it doesn't encourage to use it compare to Rest. 

By the way when I switch between requests in my history I have a blank screen and need to reload the page.

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 238

This is an accepted solution.

If you are attempting to update an order then your input variable set only contains the order ID and nothing else. I'm not sure about the Shopify API error response, but try adding at least one additional field besides the ID. Try adding "title": "Updated Title" or something else so that there is something to update!

ValentinMercier
Tourist
10 1 0

Thank you Greg, I feel a bit ashamed as I should have think to that, but as said in my previous post you expect the official documentation to work as it. 

Something like that : 

{
  "input": {
    "id": "Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE="
    "email": "mynewmail@iwishtoupdate.com"
  }
}

 

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 238

If you are talking about the interactive sample, that's a bare-bones template. Where the user needs to punch in some details. That the interactive auto-complete helps guide the user through. I get it though, in that sometimes getting started can be a challenge!

0 Likes