Skip to content

fix(graphcache): Mark deferred, uncached results as partial#3163

Merged
kitten merged 5 commits intomainfrom
fix/partial-defer-results
Apr 20, 2023
Merged

fix(graphcache): Mark deferred, uncached results as partial#3163
kitten merged 5 commits intomainfrom
fix/partial-defer-results

Conversation

@kitten
Copy link
Copy Markdown
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