New data in createPage does not update between builds #29086
Labels
topic: data
Relates to source-nodes, internal-data-bridge, and node creation
type: bug
An issue or pull request relating to a bug in Gatsby
Description
The problem is that the page context is not updating when I fetch data from my API. So if I do a build, change the data in my API, and then do another build, the the pages aren't updated.
I'm using Gatsby 2.30.3 (I've had this issue on earlier versions as well). When I'm fetching data from an API in createPages the context for the pages does not update, and when using develop the __graphQL endpoint is updated but not the pages. I have tried to boil this down to a very simple use case to make sure that other plugins etc. aren't the cause, and I have gotten down to a really minimal example where the problem still persists.
Steps to reproduce
To reproduce the error all I have to do is to run:
grebbanniclas/gatsby-build-issue@48322c1
First run of gatsby develop - same data
Second run of gatsby develop - different data
Expected result
The data shown on the page should update between builds when the data I put into createPage changes.
Actual result
It does not update.
Environment
The text was updated successfully, but these errors were encountered: