We recently upgraded our code base from Gatsby v4 to v5 using the following Documentation. After the upgrade we noticed that GraphiQL no longer worked, it would quickly load and then flash to a white screen. All other pages load correctly.
After some debugging, we found that the environmental variable ENABLE_GATSBY_REFRESH_ENDPOINT was the culprit, and removing this from the the Package.json develop call made it so that we could loaf GraphiQL correctly. This call previously worked on Gatsby v4 with no issues.
"develop": "ENABLE_GATSBY_REFRESH_ENDPOINT=true gatsby develop --verbose" ,
We also saw that some articles were using cross-env in front of the env var, but this returned the same result. As well as using it in the .env.development file as well (.env file gets loaded into config as shown in the docs).
There are no errors in the cli reported while running and encountering this issue.
With a clean version of Gatsby v5 we can run with the the ENABLE_GATSBY_REFRESH_ENDPOINT var in the develop command. However, when it exist in the .env.develop, and the .env file is called into the config we get the flash to the white screen on GraphiQL.