Skip to content

Conversation

@JoviDeCroock
Copy link
Collaborator

@JoviDeCroock JoviDeCroock commented Dec 29, 2025

Resolves #3826

Summary

This prevents caching errors during suspending queries, one thing that sprung to mind while implementing this fix is that it's not strictly necessary to cache the results. This hinges on the premise of the user using a cache and not having any async exchanges before that cache though.

Another thing worth noting is that it looks like our cache-exchanges cache errors as well meaning that for a retry to happen we'd need an explicit network-only or cache-and-network type of fetch

Set of changes

  • Add guard for caching errored queries

@changeset-bot
Copy link

changeset-bot bot commented Dec 29, 2025

🦋 Changeset detected

Latest commit: 8a02b60

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

This PR includes changesets to release 1 package
Name Type
urql 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

@JoviDeCroock JoviDeCroock force-pushed the fix-suspense-caching-errors branch from 57a91b0 to 8a02b60 Compare December 29, 2025 05:59
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.

React Suspense cache (client._react) persists error results which prevents error recovery

2 participants