@apollo/client
4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed
3.14.1 is the newest release of 3.x.
In short
1 deprecated6 new3 fixed1 changed
- deprecated
Deprecate the
onSubscriptionDatacallback in favor of a newonDatacallback for theuseSubscriptionhook. Deprecate theonSubscriptionCompletecallback in favor of a newonCompletecallback for theuseSubscriptionhook.
Release note
Minor Changes
Implement preview support for the
@deferdirective.
@alessbell and @benjamn in #10018Implement
useFragment_experimentalhook, which represents a lightweight live binding into theApolloCache, and never triggers network requests of its own.
@benjamn in #8782Allow registering named fragments with
InMemoryCacheto support using...NamedFragmentin queries without redeclaringNamedFragmentrepeatedly in every query that uses it.
@benjamn in #9764Support
onErrorcallback foruseSubscriptionhook.
@jeroenvisser101 in #9495Implement
preserveHeaderCaseoption forhttpcontext object, enabling preserved header capitalization for non-http-spec-compliant servers.
@mrdoombringer in #9891
Patch Changes
Delay calling
onCompletedandonErrorcallbacks passed touseQueryusingPromise.resolve().then(() => ...)to fix issue #9794.
@dylanwulf in #9823Replace
concast.cleanupmethod with simplerconcast.beforeNextAPI, which promises to call the given callback function just before the next result/error is delivered. In addition,concast.removeObserverno longer takes aquietly?: booleanparameter, since that parameter was partly responsible for cleanup callbacks sometimes not getting called.
@benjamn in #9718Allow preserving header name capitalization when creating an
HttpLinkwithcreateHttpLink({ uri, preserveHeaderCase: true }). Otherwise, header names are converted to lowercase to prevent case-sensitivity bugs.
@MrDoomBringer in #9891Make queries with a
pollIntervalrespect theno-cachefetch policy, instead of writing polled results into the cache.
@MrDoomBringer in #10020- deprecated
Deprecate the
onSubscriptionDatacallback in favor of a newonDatacallback for theuseSubscriptionhook. Deprecate theonSubscriptionCompletecallback in favor of a newonCompletecallback for theuseSubscriptionhook.
@jerelmiller in #10134
Potentially disruptive
The optional
subscribeAndCounttesting utility exported from@apollo/client/testing/corenow takes a single genericTResulttype parameter, instead ofTData. This type will typically be inferred from theobservableargument type, but if you have any explicit calls tosubscribeAndCount<TData>(...)in your own codebase, you may need to adjust those calls accordingly.
@benjamn in #9718