@apollo/client
4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed
Upgrading @apollo/client from 3.2.6 to 3.14.1
150 releases in betweennotes for 149
- 56+
- changes to make
- 0
- advisories fixed
- 207+
- new
- 308+
- fixes
Counted from 149 of 150 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- breaking3.11.0
- breaking3.11.0
- breaking3.11.0
- breaking3.10.4
- breaking3.10.0
- breaking3.10.0
- breaking3.8.5
- breaking3.8.0
- breaking3.8.0
- breaking3.8.0
Release by release
3.14.1no release note
- new
Add deprecations and warnings to remaining APIs changed in Apollo Client 4.0.
- new
Add warnings and deprecations for options and methods for all React APIs.
- new
Add
preloadQuery.toPromise(queryRef)as a replacement forqueryRef.toPromise().queryRef.toPromise()has been removed in Apollo Client 4.0 in favor ofpreloadQuery.toPromiseand is now considered deprecated. - new
Version bump only to release latest as
rc.
- new
- fixed
Fix a possible race condition on queries that were reobserved before they were subscribed to the first time.
- fixed
- fixed
Fix in-flight multipart urql subscription cancellation
- fixed
- fixed
Refactored cache emit logic for ObservableQuery. This should be an invisible change.
- fixed
- fixed
Keep ObservableQuery created by useQuery non-active before it is first subscribed
- fixed
- fixed
Fix an issue where a
cache-firstquery would return the result for previous variables when a cache update is issued after simultaneously changing variables and skipping the query.
- fixed
- fixed
Use import star from
rehacktto prevent issues with importing named exports from external CJS modules.
- fixed
16 other lines we could not sort, mostly version bumps
- 3.7.0
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. - 3.6.0
Calling
fetchMorefor queries using thecache-and-networkornetwork-onlyfetch policies will no longer trigger additional network requests when cache results are complete. Instead, those complete cache results will be delivered as if using thecache-firstfetch policy. - 3.6.0
Reimplement
useQueryanduseLazyQueryto use the proposeduseSyncExternalStoreAPI from React 18. - 3.6.0
The internal use of
options.fetchBlockingPromisebyuseQueryanduseLazyQuerymay slightly delay the delivery of network results, compared to previous versions of Apollo Client. Since network results are already delivered asynchronously, these timing differences should not be disruptive in most cases. Nevertheless, please open an issue if the timing differences are a problem for you (and you have no easy workaround). - 3.5.4
[Relevant if you use Apollo Client with React Native] Since Apollo Client v3.5.0, CommonJS bundles provided by
@apollo/clientuse a.cjsfile extension rather than.cjs.js, so Node.js won't interpret them as ECMAScript modules. While this change should be an implementation detail, it may cause problems for the Metro bundler used by React Native, whoseresolver.sourceExtsconfiguration does not include thecjsextension by default. - 3.5.1
Remove npm from dependencies, and avoid referencing graphql-js enum value.
- 3.4.0
To avoid retaining sensitive information from mutation root field arguments, Apollo Client v3.4 automatically clears any
ROOT_MUTATIONfields from the cache after each mutation finishes. If you need this information to remain in the cache, you can prevent the removal by passing thekeepRootFields: trueoption toclient.mutate.ROOT_MUTATIONresult data are also passed to the mutationupdatefunction, so we recommend obtaining the results that way, rather than usingkeepRootFields: true, if possible. - 3.4.0
Internally, Apollo Client now controls the execution of development-only code using the
__DEV__global variable, rather thanprocess.env.NODE_ENV. While this change should not cause any visible differences in behavior, it will increase your minified+gzip bundle size by more than 3.5kB, unless you configure your minifier to replace__DEV__with atrueorfalseconstant, the same way you already replaceprocess.env.NODE_ENVwith a string literal like"development"or"production". For an example of configuring a Create React App project without ejecting, see this pull request for our React Apollo reproduction template. - 3.4.0
Internally, Apollo Client now uses namespace syntax (e.g.
import * as React from "react") for imports whose types are re-exported (and thus may appear in.d.tsfiles). This change should remove any need to configureesModuleInteroporallowSyntheticDefaultImportsintsconfig.json, but might require updating bundler configurations that specify named exports of thereactandprop-typespackages, to include exports likecreateContextandcreateElement(example). - 3.4.0
Respect
no-cachefetch policy (by not reading anydatafrom the cache) forloading: trueresults triggered bynotifyOnNetworkStatusChange: true.
12 internal lines (docs, tests, tooling) left out.