I am building a website using Gatsbyjs and NetlifyCMS. I\'ve started using this starter https://github.com/AustinGreen/gatsby-starter-netlify-cms, and I am trying to customise i
gatsby-transformer-remark
and all other plugins that are dependant on GraphQL queries can only read newly added variables when the GraphQL queries are run.
In Gatsby, GraphQL queries are run ONCE at startup of your development server.
The queries will not be refreshed if you alter the code while gatsby develop
is still live. You can run your GraphQL queries again by restarting with gatsby develop
.
The Gatsby documentation has its own entry of the Gatsby Build Process that shows when exactly the queries are run:
success open and validate gatsby-configs - 0.051 s
// ...
success onPostBootstrap - 0.130 s
⠀
info bootstrap finished - 3.674 s
⠀
success run static queries - 0.057 s — 3/3 89.08 queries/second // GraphQL queries here
success run page queries - 0.033 s — 5/5 347.81 queries/second // GraphQL queries here
success start webpack server - 1.707 s — 1/1 6.06 pages/second
As a rule of thumb that I learned from experience, if you are wondering why your code changes are not hot reloading
gatsby develop
. gatsby clean
, clear your browser's site cache, and run gatsby develop
.