gatsby-source-drupal: Incremental build - adding a backlink to a node is not enough to rerun page queries related to it #33284
Labels
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
Example scenario:
The end result is that page-data.json for that page (office) has stale data, so it's not rebuilt properly.
In our use case the backlinks are used to display a list of vacancies on an office page, and although the backlink is created fine in the plugin, that's not enough to rebuild the page, so altough the graphql data is updated properly, the page uses old data.
I was able to check the node before it was passed on to the "createNode" function with a debugger. Everything seemed fine there. But even manually changing the value of one of the fields (before the contentDigest is genererated) didn't cause page query reruns. I suspect this might be an issue that instead of creating a new object with copied data, the plugin is modifying an object that it got through the "getNode" function. After this I've updated this "node--office" in drupal (didn't change any data, just saved it), and the next build picked that up properly and rerun the queries - the data didn't change, but the "createNode" method got a different object with the same fields which was enough to cause an update.
Reproduction Link
Expected Result
Office queries would be rerun.
Actual Result
Office queries aren't rerun.
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: