GraphQL - OrdersQuery Results in "Failed to fetch"

The GraphQL OrderQuery results in a “Failed to fetch” error every time. I believe this began around the 1st of July. I’d provide more details; however, even using the sample query in the GraphQL Explorer results in the same error. Does anybody have any insight into this issue?

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

https://developer.squareup.com/docs/orders-api/quick-start/start
Handling Errors
Orders API: How It Works

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

I just tested the sample query and it worked as expected. Do you have any additional details or examples? :slightly_smiling_face:

Here is the error I am getting from my app. This was working fine until this month.

“msg”:"ERROR: GetOrders - Error: An internal error has occurred, and the API was unable to service your request.: {"response":{"errors":[{"message":"An internal error has occurred, and the API was unable to service your request.","extensions":{"code":"OPA_CONNECT_ERROR"},"code":"INTERNAL_SERVER_ERROR"}],"data":{"orders":null},"status":200,"headers":{}}

Also, just running the sample query for GetOrders using the GraphQL Explorer tool returns “Unable to Fetch”.

What’s your application ID? :slightly_smiling_face:

sq0idp-flIS7IYBiXpIz2lLdwmzLA

Were you able to check into my application ID? Any ideas what the issue may be?

Thanks

I still haven’t been able to replicate this. What’s the full payload of the GraphQL your making. :slightly_smiling_face:

Using the GraphQL Explorer “Square GraphQL Explorer”, with my Production instance selected and using the sample Orders query, I am now receiving the following error. This works fine in Sandbox.

“{"message":"Unexpected token ‘<’, \"<!DOCTYPE \"… is not valid JSON"}”

When you switched to production did you also switch your merchant_id and location_id? We haven’t been able to replicate this with the example query. :slightly_smiling_face:

Yes - I actually got it to work. However, it only works if the “first” argument is provided. This was not the case previously and according to the sample query, it should not be required.

Do you have a video or screen share of this? What’s the difference in the queries? :slightly_smiling_face:

Hello, the queries are exactly the same except that the first argument is added to make it work. I have taken a screen recording and made it available at the following link: Nextcloud