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(graphcache): fix loop bug when schema is present #2831

Merged
merged 3 commits into from
Dec 1, 2022

Conversation

JoviDeCroock
Copy link
Collaborator

@JoviDeCroock JoviDeCroock commented Nov 25, 2022

Resolve #2830

Summary

When we have a partial result we should stop the query from re-fetching, this was a case that we hadn't caught yet. The issue here being that we will also eat the error as we aren't caching those. Basically the query will complete and we will get two results from cache without the errors rather than the plain result with an error added on top.

@JoviDeCroock JoviDeCroock requested a review from kitten November 25, 2022 15:24
@JoviDeCroock JoviDeCroock marked this pull request as ready for review November 27, 2022 08:00
@nandorojo
Copy link
Contributor

Thank you for this! Big fix for us.

Copy link
Member

@kitten kitten left a comment

Choose a reason for hiding this comment

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

Just gave this another look over; re. simplifying some of the conditions we have across this file, I think it's fine currently, and I don't see anything we could batch with this change.

For context, originally the theory was that cacheMissOps$'s filter needed a change, however, network-only doesn't even arrive there due to the differentiation via nonCacheOps$.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When two components use same query and error exists, both components keep fetching indefinitely.
3 participants