Shopify-Admin-API-GraphiQL version 2021-01 is used.
We are attempting to fetch data of orders for one of our clients and are experiencing difficulties. the request failed and the status is INTERNAL_SERVER_ERROR.
There is a lot of data for this client, and even when we tried to fetch the client data only for one day, we got the same error.
According to your suggestions, we minimized the query as much as we could and also added sortKey:‘CREATED AT’ to the query, as shown below, but we still get the same error.
Query:
mutation {
bulkOperationRunQuery(
query: “”"
{
orders(query:“(created_at:>‘2021-09-25T07:00:00Z’ created_at:<‘2021-09-25T07:00:00Z’) OR (updated_at:>‘2021-09-25T07:00:00Z’ updated_at:<‘2021-09-25T07:00:00Z’),sortKey:‘CREATED_AT’”)
{
edges
{
node
{
id
createdAt
Could you please provide the x-request-id header field value for a recent attempt at this bulk mutation? We can take a look in the logs as there may be more information about the error provided there.
From what I can see in the logs, it looks like your application already had a bulk operation progress when that call was made. However I believe the error message should be more specific. You can try polling the status of the currently running query with the process described here: https://shopify.dev/api/usage/bulk-operations/queries#option-b-poll-your-operation-s-status This will let you see any jobs which is still in progress. If it is complete it will provide a link to the results.
Just picking up the thread here - if this is still persistent, please feel free to share an X-Request-ID here and we can take a look in the logs - thanks!
Thanks! I checked the logs and this particular query is causing a DB performance issue, and so Internal Server error was returned. I know you’d mentioned you’d streamlined the query but if it’s an option at all to break that main query on orders into seperate run queries for high volume stores, it could be worth considering.
Internal Server Error is a good reason to investigate - particular when errors are consistent. However, there isn’t much further our team can go since we currently don’t provide authenticated support through these forums, limiting our ability to dig deeper, locate accounts, stores, or much else past generic API logs.
That said, if you can replicate any unexpected response after polling the Bulk Operation status and if feel you are facing an issue, I’d suggest logging any RAW request bodies, returned x-request-id response headers, errors, and then send those along with a short description using our bug reporting tool.
You can get to the bug reporting tool by following this link to authenticate your account, and select the new option to “Report an issue [BETA]”. We can’t guarantee all requests or bugs reported here are answered directly, but I would thoroughly encourage you to use this option.