gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.28k stars 10.31k forks source link

[feat]: pass data from webhook to sourceNodes function #15279

Closed DSchau closed 5 years ago

DSchau commented 5 years ago

Summary

Gatsby Preview invokes sourceNodes kinda blindly from the webhook.

To make authoring some source plugins easier, we could directly pass the webhook data from the CMS -> Gatsby Preview -> Gatsby, which oftentimes contains the incremental data that is needed to refresh Gatsby Preview content at the plugin level.

Basic example

We should pass webhookData that is the req.body (as JSON) from the POST invocation. This will contain the entire payload from the webhook request from the CMS.

Motivation

This unblocks even more source plugins from being able to refresh content in a Gatsby Preview environment, presuming they pass the differential data to the webhook (many of which do, notably CosmicJS).

gatsbot[bot] commented 5 years ago

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

gatsbot[bot] commented 5 years ago

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!