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
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
@TylerBarnes TylerBarnes added this to To cherry-pick in V4 Release hotfixes via automation Jan 18, 2023
@TylerBarnes TylerBarnes added this to To cherry-pick in V5 Release hotfixes via automation Jan 18, 2023
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 tyhopp moved this from To cherry-pick to Backport PR opened in V4 Release hotfixes Jan 19, 2023
@tyhopp tyhopp moved this from To cherry-pick to Backport PR opened in V5 Release hotfixes Jan 19, 2023
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 tyhopp moved this from Backport PR opened to Backported in V5 Release hotfixes Jan 19, 2023
@tyhopp tyhopp moved this from Backported to Published in V5 Release hotfixes Jan 19, 2023
@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
Development

Successfully merging this pull request may close these issues.

None yet

4 participants