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

feat(gatsby-source-wordpress): process multiple manifest ids on a preview action #32723

Merged

Conversation

TylerBarnes
Copy link
Contributor

@TylerBarnes TylerBarnes commented Aug 6, 2021

Initially I thought building the manifest ID on the Gatsby side would be enough. Then I noticed if a preview build fails and then is triggered again but the user is still sitting on the preview loader they will be waiting for a manifest id that will never exist even though the preview might still succeed. So in gatsbyjs/wp-gatsby#180 I'm storing manifest ID's on each preview action in WP so that they can be queried in gatsby-source-wordpress and each can be processed.

This makes WP preview more stable with the upcoming preview loader.

To prevent making a breaking change and needing to release v6 of gatsby-source-wordpress due to requiring a new minimum remote version of WPGatsby I added a new helper to check if a field name exists on a type in the remote schema so that the new code will only run if WPGatsby supports this feature. So the WPGatsby PR above can only be merged once Cloud loader is released but this PR can be merged/released anytime.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 6, 2021
@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 Aug 6, 2021
…e delete every preview we process so this accounts for very long cold builds between previews
Copy link
Contributor

@DanielSLew DanielSLew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just gotta fix the ci/circleci: unit_tests_node14_lmdb_store test. I think the e2e test is currently broken for everyone now though.

@TylerBarnes TylerBarnes merged commit 627039a into master Aug 9, 2021
@TylerBarnes TylerBarnes deleted the feat/process-multiple-manifest-ids-gatsby-source-wordpress branch August 9, 2021 17:07
pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
…view action (gatsbyjs#32723)

* remove unused import

* add ability to check if a remote type has a specific field available

* if WPGatsby supports node manifest id's on previews then loop through them and create a node manifest for each

* allow sourcing pending previews that were made in the last 60 mins. We delete every preview we process so this accounts for very long cold builds between previews

* Update index.ts
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.

None yet

2 participants