Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to retry Graphql requests #26

Merged
merged 7 commits into from
Jul 10, 2023

Conversation

joselcvarela
Copy link
Member

Motivation

When we are doing a build, we expect that to be successful.
Although in some cases, we may have momentary network issues or even the project not being able to respond in expected.

Solution

To overcome this scenarios, this PR introduces the concept of retries.
It is configured with 5 retries that are delayed between 1 and 8 seconds.

This was inspired on gatsby-source-graphql implementation since we are already using it, so we can just include node-fetch as peer dependency (correct me if I am wrong).

PS: Not sure why there's many changes on pnpm-lock.yaml but probably because of pnpm version. I am using 8.6.2

gatsby-node.js Outdated Show resolved Hide resolved
gatsby-node.js Outdated Show resolved Hide resolved
joselcvarela and others added 2 commits July 10, 2023 06:23
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
@rijkvanzanten rijkvanzanten merged commit b542588 into directus:main Jul 10, 2023
2 checks passed
@joselcvarela joselcvarela deleted the set-retries branch July 11, 2023 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants