@apollo/client
4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed
3.14.1 is the newest release of 3.x.
In short
11 new3 fixed
Release note
Apollo Client 3.2.0
Bug Fixes
Use
options.nextFetchPolicyinternally to restore originalFetchPolicyafter polling withfetchPolicy: "network-only", so that polling does not interfere with normal query watching.
@benjamn in #6893Initialize
ObservableQueryinupdateObservableQueryeven ifskipistrue.
@mu29 in #6999Prevent full reobservation of queries affected by optimistic mutation updates, while still delivering results from the cache.
@benjamn in #6854
Improvements
In TypeScript, all APIs that take
DocumentNodeparameters now may alternatively takeTypeDocumentNode<Data, Variables>. This type has the same JavaScript representation but allows the APIs to infer the data and variable types instead of requiring you to specify types explicitly at the call site.
@dotansimha in #6720Bring back an improved form of heuristic fragment matching, by allowing
possibleTypesto specify subtype regular expression strings, which count as matches if the written result object has all the fields expected for the fragment.
@benjamn in #6901Allow
options.nextFetchPolicyto be a function that takes the currentFetchPolicyand returns a new (or the same)FetchPolicy, makingnextFetchPolicymore suitable for global use indefaultOptions.watchQuery.
@benjamn in #6893Implement
useReactiveVarhook for consuming reactive variables in React components.
@benjamn in #6867Move
apollo-link-persisted-queriesimplementation to@apollo/client/link/persisted-queries. Try running our automated imports transform to handle this conversion, if you're usingapollo-link-persisted-queries.
@hwillson in #6837Disable feud-stopping logic after any
cache.evictorcache.modifyoperation.
@benjamn in
#6817 and
#6898Throw if
writeFragmentcannot identifyoptions.datawhen nooptions.idprovided.
@jcreighton in #6859Provide
options.storageobject tocache.modifyfunctions, as provided toreadandmergefunctions.
@benjamn in #6991Allow
cache.modifyfunctions to returndetails.INVALIDATE(similar todetails.DELETE) to invalidate the current field, causing affected queries to rerun, even if the field's value is unchanged.
@benjamn in #6991Support non-default
ErrorPolicyvalues (that is,"ignore"and"all", in addition to the default value"none") for mutations and subscriptions, like we do for queries.
@benjamn in #7003Remove invariant forbidding a
FetchPolicyofcache-onlyinObservableQuery#refetch.
@benjamn in ccb0a79a, fixing #6702