A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We consistently get Internal Server Error (as above) on some of the bulk requests. The query in question:
{ orders(query: "updated_at:*") { edges { node { id createdAt name updatedAt physicalLocation { id name } totalShippingPriceSet { shopMoney { amount } } totalDiscountsSet { shopMoney { amount } } lineItems { edges { node { id product { id title productType vendor } variantTitle name variant { id selectedOptions { name value } taxCode taxable sku inventoryItem { id sku unitCost { amount } } } totalDiscountSet { shopMoney { amount } } discountedTotalSet { shopMoney { amount } } quantity taxLines { priceSet { shopMoney { amount } } } } } } } } }
}
The same query completes correctly when we mimic the bulk request with Shopify GraphQL app.
A different query (locations(query:"updated_at:>*") {...}) executes fine.
The failing shop has demo only demo data, and the response is like this:
/admin/api/2023-04/graphql.json Date: Thu, 10 Aug 2023 11:23:42 GMT X-Request-ID: fbb7730d-352f-4284-9e2a-dedbc6595875 {'id': 'gid://shopify/BulkOperation/4022380626250', 'url': None, 'status': 'FAILED', 'errorCode': 'INTERNAL_SERVER_ERROR', 'objectCount': '0', 'fileSize': None, 'partialDataUrl': None}
Hi @Madis ,
We can't provide authenticated support in the forums to look into your specific example, but bulk operations can fail for any of the same reasons that normal queries can.
If you can bulk query locations, but not orders, have you tested the same queries in a normal request to the GraphQL Admin API?
Hope that helps.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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
As mentioned earlier the when we mimic the bulk request using the Shopify GraphQL App (https://shopify.dev/docs/apps/tools/graphiql-admin-api) installed to that specific store it all looks fine.
I'd recommend testing with an HTTP client like Postman or Insomnia so you can use the same app permission when testing, but if you want to use GraphiQL, have you tried confirming access scopes to make sure both apps have identical access?
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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
This error invariably started to occur some time in April when we upgraded to 2023-04 API version. Now testing different API versions it appears the same request works fine with 2022-07 and 2022-04. We migrated from the latter to the then-current version.