Hello, we’re really having trouble trying to cancel some inventory snapshots with a mutation.
Previously, we were just getting back a response like we had queried for the snapshot details and the details were returned. About 10 days ago we started getting this error:
Since this is a mutation, I’m not sure why a query would be reqired. And why has this error message changed when nothing about our query has changed?
We’re making a post request to the graphql endpoint with the mutation and variables fields included. No query is being sent at all in this case. Now I’m second-guessing the actual post fields that the data should be submitted with, but our order creation mutations are working fine so I don’t think that’s the problem.
Could you please share a request_id you are getting with that response with us?
You can get it by adding the field request_id inside query at the same level as data.
This will allow us to find the payload and trace the API call to respond accurately.
Have a good day!
Are we supposed to be passing an empty query field to the endpoint even if we are making a mutation call? I thought when making a mutation we pass mutation and variables fields.
About your last response. In this case, yes. It is valid to make a mutation with an empty query field (like the example posted above).
Please let me know if this doesn’t solve your concern.
Have a nice day!
Thanks, this works. I was trying to use a variable and it wasn’t working like I was expecting. I gave up on that and just hardcoded the value in to the query.