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

Fix/reloading screen while refreshing #2

Open
wants to merge 1 commit into
base: fix/20576-call-refresh-while-refreshing
Choose a base branch
from

Conversation

apaniel
Copy link
Owner

@apaniel apaniel commented Jun 22, 2020

Description

changes:

  • Show the restarting page while data is refreshing can be enabled by setting

  • ENABLE_GATSBY_RESTARTING_SCREEN_ON_REFRESH env variable

Updated docs with the new env variable

Showing the restarting page is not only useful to have some feedback in the UI about what is going on behind the scenes, but also to be able to make a request to the development server without having to wait.

Why is this useful?

This is specially useful for non-developer gatsby-users that use gatsby develop in a preview environment and they need the data up to date, or to know what is going on if data is refreshing.
It is also useful for doing health-checks when having the development server in a container as a preview server. Otherwise health-checks can fail because development server cannot respond while refreshing.

Why an env variable to enable the restarting screen?

There were some tests making use of the refresh endpoint for the preview, I am not sure that this is something we want to show in all the scenarios, so I created this env variable to be able to opt in.

Related MR

gatsbyjs#24887

…age reload included, switch by env variable
@apaniel apaniel force-pushed the fix/reloading-screen-while-refreshing branch from a560f8a to 9ad1b88 Compare June 23, 2020 09:31
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.

1 participant