-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add refresh content docs #26106
Add refresh content docs #26106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @herecydev! This is a really helpful addition. Thank you for this docs contribution as well as actually adding the button!
I see a couple of typos and have a few suggestions which are detailed inline. Please let me know what you think. I'll check back in soon!
Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com>
Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com>
Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com>
Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com>
Thanks Aisha, I think all your suggestions were sensible and have been committed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much, Dan and Aisha!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks so much.
* Add refresh content docs * Update docs/docs/refreshing-content.md Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com> * Update docs/docs/refreshing-content.md Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com> * Update docs/docs/refreshing-content.md Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com> * Update docs/docs/refreshing-content.md Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com> Co-authored-by: Aisha Blake <aisha.g.blake@gmail.com>
If set to true, this will expose a `/__refresh` webhook that is able to receive `POST` requests to _refresh_ the sourced content. This exposed webhook can be triggered whenever remote data changes, which means you can update your data without re-launching the development server. | ||
|
||
You can trigger this endpoint locally, for example, on Unix-based operating systems (like Ubuntu and macOS) using `curl -X POST http://localhost:8000/__refresh`. | ||
This allows you to refresh your sourced content. See [Refreshing content](/docs/content-and-data/refreshing-content). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong link ...
created PR:
- fix(docs): page Environment Variables -> 404 on link #26539
fix(docs): page Environment Variables -> 404 on link
|
||
You can trigger this endpoint locally, for example, on Unix-based operating systems (like Ubuntu and macOS) using `curl -X POST http://localhost:8000/__refresh`. | ||
|
||
Additionally, the sourced content can also be refreshed with the "Refresh Data" button in the [GraphiQL explorer](/docs/running-queries-with-graphiql). This button is only visible if `ENABLE_GATSBY_REFRESH_ENDPOINT` is set to `true`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a backlink to this doc at the GraphiQL Exlorer page?
Related: #25960