Skip to content

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 <[email protected]>
@tyhopp
Copy link
Contributor

tyhopp commented Jan 19, 2023

Backported to v5 in [email protected]

tyhopp added 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 <[email protected]>
Co-authored-by: Ty Hopp <[email protected]>
@tyhopp
Copy link
Contributor

tyhopp commented Jan 19, 2023

Backported to v4 in [email protected]

@TylerBarnes
Copy link
Contributor Author

Thanks @tyhopp !

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.

5 participants