Minor Changes
- With the "single-source behavior" the
Client
will now also avoid executing an operation if it's already active, has a previous result available, and is either run with thecache-first
orcache-only
request policies. This is similar to a "short circuiting" behavior, where unnecessary work is avoided by not issuing more operations into the exchange pipeline than expected, by @kitten (See #1600) - Add consistent "single-source behavior" which makes the
Client
more forgiving when duplicate
sources are used, which previously made it difficult to use the same operation across an app
together withcache-and-network
; This was a rare use-case, and it isn't recommended to overfetch
data across an app, however, the newClient
implementation of shared sources ensures that when an
operation is active that theClient
distributes the last known result for the active operation to
any new usages of it (which is called “replaying stale results”) (See #1515)