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): Mark deferred, uncached results as partial #3163

Merged
merged 5 commits into from
Apr 20, 2023

Conversation

kitten
Copy link
Member

@kitten kitten commented Apr 19, 2023

Resolves #3161

Summary

Previously, as hasNext wasn't consistently handled across the urql codebase prior to v4, we didn't have a signal and logic to handle partial, deferred results. We can now add the hasNext flag to @urql/exchange-graphcache and let deferred, uncached results fall through the usual cached result handling, and instead, pass the query on to the API.

Set of changes

  • Add hasNext flag to cached query results
  • Handle hasNext cache results in cacheExchange and pass them on
  • Increase consistency of stale flag for cache-only operations

@kitten kitten requested a review from JoviDeCroock April 19, 2023 10:46
@kitten kitten merged commit b5e50b4 into main Apr 20, 2023
@kitten kitten deleted the fix/partial-defer-results branch April 20, 2023 09:49
@github-actions github-actions bot mentioned this pull request Apr 20, 2023
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.

cache issues when using @defer directive and @urql/exchange-graphcache
2 participants