urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.63k stars 451 forks source link

fix(core): return a result in cache-only scenarios #3459

Closed JoviDeCroock closed 9 months ago

JoviDeCroock commented 9 months ago

Resolves #3457

Summary

When we are dealing with a cache-only request-policy we should return a result on cache-miss, if we don't do this defaulting we end up returning undefined which crashes the client entirely

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: 69d99d334015b7f997f94856ee7310ae5911076d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------- | ----- | | @urql/core | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR