gatsby
gatsby copied to clipboard
fix(gatsby-source-drupal): process included nodes on preview and incremental builds
Description
This PR addresses two issues:
- When multiple nodes are updated at the same time via the preview or fastbuild updates, references to newly created content can get lost, depending on the order in the payload.
- Fields that are marked as
included
within Drupal (with JSON:API Extras) are passed, but not processed by Gatsby in the preview or fastbuild updates.
Solution
I adapted handleWebhookUpdate
to accept multiple nodes at once and process the references between them correctly to solve issue #1
. Then I added included
content from the json payload to the list of nodes to be processed on preview or fastbuild update.
@pmelab This PR has conflicts, FYI.