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.57k stars 444 forks source link

fix(core): Force client.reexecuteOperation to dispatch #3363

Closed kitten closed 11 months ago

kitten commented 11 months ago

Resolves #3254

Summary

Previously, when Graphcache issued an optimistic mutation that led to a cache miss, the cache-missed query operation would stall since it wasn't allowed to be issued again.

This patch prevents such “stalls” by forcing operations to be dispatched when client.reexecuteOperation is called. This allows Graphcache and related exchanges to force re-execution of operations, regardless of the deduplication behaviour.

Set of changes