You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cover the contracts the single-chain watcher relies on
Three properties the previous commit depends on had no test of their own.
Each was verified to fail against a deliberate break of what it covers.
- initialFetchDoesNotTriggerTheWatcher: the initial fetch writes to the cache
and publishes, and the watcher subscribes only afterwards, so it must not
react to its own write. Fails when the subscription is moved ahead of the
fetch.
- refetchUsesTheRefetchPolicyRatherThanTheFetchPolicy: the initial responses
use the fetch policy and the refetches use the refetch policy, including
when they disagree. Pins the refetch request built by the interceptor, which
has to clear the noCache set by a NetworkOnly fetch policy. Fails when
refetches reuse the original request.
- watchExecutesTheInterceptorChainOnce: counts executions of an interceptor
installed ahead of the cache. Fails with expected:<1> but was:<2> against
the previous two-execution implementation, which is the regression it
exists to catch.
The synchronisation point of apollographql/apollo-kotlin#3853 and the absence
of an initial request in watch(data) were already covered, by
storeWriteTriggersWatcher and cacheOnlyFetchPolicy respectively.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments