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

fix(gatsby-source-wordpress): fix preview issues #37492

Merged
merged 3 commits into from
Jan 18, 2023

Conversation

TylerBarnes
Copy link
Contributor

@TylerBarnes TylerBarnes commented Jan 18, 2023

While testing #37478 I discovered there are some cases where not providing an empty array here as a default causes problems

I also realized the code checks for webhookBody.preview which doesn't ever exist and as a result causes source-wordpress to re-source all data when restarting pods. So I simplified that check and fixed it

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 18, 2023
@TylerBarnes TylerBarnes added topic: source-wordpress Related to Gatsby's integration with WordPress and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 18, 2023
@TylerBarnes TylerBarnes requested a review from kathmbeck January 18, 2023 19:47
DanielSLew
DanielSLew previously approved these changes Jan 18, 2023
kathmbeck
kathmbeck previously approved these changes Jan 18, 2023
@TylerBarnes TylerBarnes dismissed stale reviews from kathmbeck and DanielSLew via 541f833 January 18, 2023 19:51
@TylerBarnes TylerBarnes changed the title fix(gatsby-source-wordpress): add fallback array to prevent errors when cachedNodeIds aren't passed fix(gatsby-source-wordpress): fix preview issues Jan 18, 2023
@TylerBarnes TylerBarnes merged commit 48d4069 into master Jan 18, 2023
@TylerBarnes TylerBarnes deleted the fix/wp-cached-node-ids-array branch January 18, 2023 23:20
tyhopp pushed a commit that referenced this pull request Jan 19, 2023
* add fallback array to prevent errors when cachedNodeIds aren't passed

* if there's a token we're previewing - also await non node root fields for previews

(cherry picked from commit 48d4069)
tyhopp pushed a commit that referenced this pull request Jan 19, 2023
* add fallback array to prevent errors when cachedNodeIds aren't passed

* if there's a token we're previewing - also await non node root fields for previews

(cherry picked from commit 48d4069)
tyhopp pushed a commit that referenced this pull request Jan 19, 2023
* add fallback array to prevent errors when cachedNodeIds aren't passed

* if there's a token we're previewing - also await non node root fields for previews

(cherry picked from commit 48d4069)

Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com>
@tyhopp
Copy link
Contributor

tyhopp commented Jan 19, 2023

Backported to v5 in gatsby-source-wordpress@7.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-wordpress Related to Gatsby's integration with WordPress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants