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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(examples): add on-demand ISR to cms-sanity #35220

Merged
merged 3 commits into from Mar 10, 2022

Conversation

stipsan
Copy link
Contributor

@stipsan stipsan commented Mar 10, 2022

Documents how to setup GROQ webhooks that revalidates ISR routes on-demand.
It's trivial to do this for posts as you only need to lookup the slug based on the id you receive in the webhook payload.
When editing authors the GROQ query demonstrates how you can do a reverse lookup (find all pages that reference the edited author) then invalidate their routes.

This work is based on sanity-io/structured-content-2022#105, thanks @j0nas! 馃帀

Test Deploy with Vercel

Documentation / Examples

  • Make sure the linting passes by running yarn lint

@ijjk ijjk added the examples Issue/PR related to examples label Mar 10, 2022
@stipsan stipsan force-pushed the add-on-demand-ISR-to-cms-sanity branch from f29fb97 to f476699 Compare March 10, 2022 19:57
@kodiakhq kodiakhq bot merged commit f14f628 into vercel:canary Mar 10, 2022
@stipsan stipsan deleted the add-on-demand-ISR-to-cms-sanity branch March 11, 2022 11:02
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants