Skip to content

Conversation

@alvis
Copy link
Owner

@alvis alvis commented Sep 11, 2021

Previously, contentDigest is computed together with a node's children including its content and id. Therefore, if a child get updated, its parent node will get an unexpected updated with a new digestContent, triggering the old parent node getting removed together with its children, i.e. the updated child's siblings.

This update will address this issue by excluding the child's content but their ids into the computation of digestContent.

PR installable via

npm install alvis/gatsby-source-notion#pull/2/head

Fix #1

@alvis alvis changed the title Ensure that a page update won't propagate to its database node WIP: Ensure that a page update won't propagate to its database node Sep 11, 2021
@alvis alvis force-pushed the fix/unexpected-node-update branch from 1b8b806 to aefbfbb Compare September 11, 2021 13:03
@alvis alvis changed the title WIP: Ensure that a page update won't propagate to its database node Ensure that a page update won't propagate to its database node Sep 11, 2021
@alvis alvis added the bug Something isn't working label Sep 11, 2021
@alvis alvis force-pushed the fix/unexpected-node-update branch 2 times, most recently from 3ff0733 to 960798a Compare September 20, 2021 16:38
@alvis alvis changed the title Ensure that a page update won't propagate to its database node Ensure that adding/updating a resource won't get others removed Sep 20, 2021
Previously, contentDigest is computed together with a node's children including
its content and id. Therefore, if a child get updated, its parent node will get
an unexpected updated with a new digestContent, triggering the old parent node
getting removed together with its children, i.e. the updated child's siblings.

This update will address this issue by excluding the child's content but their
ids into the computation of digestContent.
@alvis alvis force-pushed the fix/unexpected-node-update branch from 960798a to c97d301 Compare September 20, 2021 16:48
@alvis alvis merged commit 0b1b24e into master Sep 26, 2021
@alvis alvis deleted the fix/unexpected-node-update branch November 3, 2021 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Will latests fixs will be embeded in a release ?

2 participants