Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Error from Graphql API Node Library

Error from Graphql API Node Library

Jadiel_Santos
Shopify Partner
5 0 5

Hello, community!

 

We built a Remix App for our store on Shopify that updates the inventory of available items for the SKUs.

This App has an endpoint that receives a POST with the number of available inventory items.

We have a service sending many requests to this endpoint so that the inventory is always updated.

We're facing the following error when trying to send Graphql queries and mutations to our store:
"HttpRequestError: Http request error, no response available: GraphQL Client: request to https://xyz.myshopify.com/admin/api/2024-07/graphql.json failed, reason:"

It's not a "bad request" or something related to the body of the requests, because it works for some time and then intermittently returns this error.
Can someone help identify what is the issue?

Replies 3 (3)

Eric-HAN
Shopify Partner
297 30 32

Hi, there

 

Have your tried to execute that GraphQL in your postman . I believe you could got the response error directly

 

- Helpful? Please hit Like and mark it as a solution
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me    Buy Me A Coffee
Jadiel_Santos
Shopify Partner
5 0 5

Hi!

 

Thank you for the reply.

I've already executed the same queries through Postman, which works fine there. The issue is only happening with my app and it started after executing many requests in a short period (without reaching the API rate limit). The app is not making many requests now, but the error is still being returned.

It relies on the Shopify API node libraries and was created with the Remix template.

Here's the stack trace:

Error: Http request error, no response available: GraphQL Client: request to https://xyz.myshopify.com/admin/api/2024-07/graphql.json failed, reason:
at action$d (file:///app/build/server/index.js?t=1727968757000:5427:95)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at Object.callRouteAction (/app/node_modules/@remix-run/server-runtime/dist/data.js:37:16)
at /app/node_modules/@remix-run/router/router.ts:4817:21
at callLoaderOrAction (/app/node_modules/@remix-run/router/router.ts:4879:16)
at async Promise.all (index 1)
at callDataStrategyImpl (/app/node_modules/@remix-run/router/router.ts:4720:17)
at callDataStrategy (/app/node_modules/@remix-run/router/router.ts:3975:19)
at submit (/app/node_modules/@remix-run/router/router.ts:3737:21)
at queryImpl (/app/node_modules/@remix-run/router/router.ts:3666:22)

Jadiel_Santos
Shopify Partner
5 0 5

To give more context, I'm trying out an alternative way to reach out to the Shopify API by not using the Shopify node libraries, so I'm making a fetch directly to the GraphQL API endpoint.
I'm still getting the same error when sending many requests, but now I have more details about it:

 

fetch-timout.png

Does someone have any clue about this timeout error?