fix(gatsby-source-wordpress): invalidate less queries during previews #30770
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.
For Preview, revisions of a node type can have data that updates unnecessarily
This PR fixes that. The result being that less queries are invalidated in Gatsby. For example if you have a query where you're getting the latest published post using the date field, that data should be static but each preview updates the date field on the node being previewed (because the revision has a new date). So if we prevent the fields in this PR from changing, this will be less problematic.
This makes preview for GatsbyJS.com significantly faster