Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Apr 28, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

LekoArts and others added 3 commits April 28, 2021 15:48
…teNode on existing node (#28682)

## Description

We're currently using `gatsby-source-drupal` to pull content from our D8 site. We precompute some fields to attach to these nodes based on their type. An example of this is fetching some information from TripAdvisor in `onCreateNode` and attaching it to the relevant node using `createNodeField`. This works great but when used in conjunction with the `fastBuilds` flag it causes issues as the node getting recreated already has a `fields` property on it.

## Proposed Solution

This PR removes the field before calling `createNode` so that any other `gatsby-node` files utilizing the `onCreateNode` hook can recompute and add back the fields.

## Documentation

- [ ] We should add a test for this behavior as well to make sure it's not broken in the future

## Related Issues

N/A

Co-authored-by: gatsbybot <[email protected]>
@pull pull bot added the ⤵️ pull label Apr 28, 2021
@pull pull bot merged commit 76f84aa into mySMB:master Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants