-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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): fix potentially wrong query results when querying fields with custom resolvers #35369
Merged
LekoArts
merged 14 commits into
master
from
fix/materialization/concurrent-runs-losing-resolved-fields
Jun 28, 2022
Merged
fix(gatsby): fix potentially wrong query results when querying fields with custom resolvers #35369
LekoArts
merged 14 commits into
master
from
fix/materialization/concurrent-runs-losing-resolved-fields
Jun 28, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gatsbot
bot
added
the
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
label
Apr 7, 2022
pieh
added
topic: GraphQL
Related to Gatsby's GraphQL layer
and removed
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
labels
Apr 7, 2022
pieh
force-pushed
the
fix/materialization/concurrent-runs-losing-resolved-fields
branch
from
June 13, 2022 12:34
bf2b490
to
04ad19e
Compare
pieh
commented
Jun 13, 2022
… from resolved nodes cache when needed
pieh
force-pushed
the
fix/materialization/concurrent-runs-losing-resolved-fields
branch
from
June 17, 2022 08:45
d19283a
to
b85ca7d
Compare
wardpeet
previously approved these changes
Jun 20, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small question but looks good
Co-authored-by: Ward Peeters <ward@coding-tech.com>
wardpeet
approved these changes
Jun 27, 2022
LekoArts
deleted the
fix/materialization/concurrent-runs-losing-resolved-fields
branch
June 28, 2022 06:55
Published in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This fixes quite a bit od edge cases that can cause wrong query results when using "materialized fields" (fields that have custom resolvers) for sorting/filtering/grouping/aggregating:
resolved-nodes
reducer (that's source of truth for getting "computed" values for sorting/filtering/grouping/aggregating on fields that need to be resolved).node.__gatsby_resolved
). With concurret runs (point above) it's not safe to rely on__gatsby_resolved
being set (as it might have been set for different fields). Instead we do check if the fields should be resolved or raw and pull resolved fields straight from source of truth (redux store) or use raw fields from node (usage in fast filters and in aggregation methods)Related Issues
Fixes #35366
[ch51808]