Skip to content
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

Merged
merged 5 commits into from
Aug 18, 2020

Conversation

herecydev
Copy link
Contributor

Related: #25960

@herecydev herecydev requested review from a team as code owners July 29, 2020 16:29
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 29, 2020
@ascorbic ascorbic added status: needs docs review Pull request related to documentation waiting for review and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jul 30, 2020
@AishaBlake AishaBlake added type: documentation An issue or pull request for improving or updating Gatsby's documentation and removed status: needs docs review Pull request related to documentation waiting for review labels Aug 1, 2020
Copy link

@AishaBlake AishaBlake left a 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!

docs/docs/refreshing-content.md Outdated Show resolved Hide resolved
docs/docs/refreshing-content.md Outdated Show resolved Hide resolved
docs/docs/refreshing-content.md Outdated Show resolved Hide resolved
docs/docs/refreshing-content.md Outdated Show resolved Hide resolved
herecydev and others added 4 commits August 1, 2020 12:34
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>
@herecydev
Copy link
Contributor Author

Thanks Aisha, I think all your suggestions were sensible and have been committed!

Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a 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!

Copy link
Contributor

@laurieontech laurieontech left a 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.

@laurieontech laurieontech merged commit 517bbd5 into gatsbyjs:master Aug 18, 2020
muescha pushed a commit to muescha/gatsby that referenced this pull request Aug 18, 2020
* 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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong link ...

created PR:


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`.
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants