-
Notifications
You must be signed in to change notification settings - Fork 2
feat: first iteration of Webhooks Example project #245
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
ℹ️ Download the wp-graphql-headless-webhooks plugin artifact from this workflow run (see the 'Artifacts' section at the bottom). |
theodesp
commented
Jun 11, 2025
theodesp
commented
Jun 11, 2025
theodesp
commented
Jun 11, 2025
theodesp
commented
Jun 11, 2025
theodesp
commented
Jun 11, 2025
colinmurphy
approved these changes
Jun 11, 2025
Member
colinmurphy
left a comment
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.
@theodesp LGTM 🚀 🚀 🚀
Thanks for leaving the comments in the various files, that was super helpful ❤️
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds an example project named webhooks-isr that demonstrates full Incremental Static Regeneration (ISR) working with Next.js integrated via WordPress webhooks. The example showcases how WordPress content updates trigger webhook calls to a Next.js API route, which then performs on-demand page revalidation using ISR. This provides a practical reference for developers to implement real-time frontend updates with a decoupled WordPress backend and Next.js frontend.
Related Issue
#173
Dependant PRs
Type of Change
How Has This Been Tested?
Testing was performed by following the instructions in the README file of the webhooks-isr example project, which includes setting up environment variables, running the Next.js app, and configuring WordPress webhooks.
Testing Steps:
Create a new post in WordPress.
Publish or update a post in your WordPress backend.
Review the post on the headless Next.js website.
Visit the corresponding page on your Next.js frontend to verify the content appears as expected.
Update the content in WordPress.
Make changes to the post content and save.
Verify the headless post updates automatically.
The Next.js site should reflect the updated content without a full rebuild, thanks to ISR triggered by the webhook.
Inspect the Next.js server logs.
You should see logs similar to the following, indicating the webhook revalidation process:
This confirms that the webhook was received, the secret validated, and the ISR revalidation was triggered successfully.
Screenshots
Checklist