feat(gatsby-source-strapi): timeout setting for queries
- Dominant language
- JavaScript
- Stars
- 57
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
## Is your feature request related to a problem? Please describe.
Hey guys, the team I'm working with needs a feature that allows us to change the timeout for queries to Strapi. We utilize Strapi as a website builder and have many sites in the CMS. We have a couple of very large sites with over 100 pages, and when the query takes 60 sec or longer we get a 504 timeout error coming from `[gatsby-source-strapi]/[axios]/lib/core/createError.js:16:15`
## Describe the solution you'd like
We'd like to be able to pass in our own timeout parameter for Strapi queries similar to how file fetching has the `GATSBY_STALL_TIMEOUT` env variable to alter the timeout settings (we've tried this and it doesn't work for our problem).
## Describe alternatives you've considered
We have looked through the code to see where the query timeout is being set to 60 seconds and we're not able to find it.
## Additional context

Contributor guide
Research direction
Start by tracing how gatsby-source-strapi creates Strapi queries and where axios applies its timeout; the issue points to axios/lib/core/createError.js:16:15 and contrasts this with GATSBY_STALL_TIMEOUT. Done means callers can provide a custom query timeout and long-running queries no longer fail at the fixed 60-second limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100