Packages

@apollo/client

4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed

Upgrading @apollo/client from 3.1.5 to 4.3.5

200 releases in betweennotes for 198

Other targets from 3.1.5Newest 3.x3.14.1
4.0.0 has no release note on GitHub or in the repository's changelog, so its breaking changes are missing from the counts below; the migration guide covers them.
59+
changes to make
0
advisories fixed
268+
new
415+
fixes

Counted from 198 of 200 release notes. Advisories are counted from the advisory database, in full.

Start here

Before you upgrade

Tick each one off as you go
  • breaking4.3.0
  • 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

Release by release

  1. 4.3.5

    19 Oct 20263 fixes
    • fixed

      Fix an issue where custom scalar values that are not JSON-serializable caused errors. These values are properly serialized when used as input for variables or when used as a key field value so that cache writes and calls to cache.identify succeed.

    • fixed

      Require the variables option in useFragment when the fragment has required variables. This matches the behavior of useSuspenseFragment and the query hooks.

    • fixed

      Parse custom scalar fields in subscription results when using the no-cache fetch policy.

  2. 4.3.4

    16 Oct 20265 fixes
    • fixed

      Fix an issue where a list field selected more than once with different selection sets lost the fields that only one of the selections included while a @defer boundary elsewhere in the query was still pending when using the GraphQL17Alpha9Handler. The results of all selections of the list field are now merged.

    • fixed

      Fixed a bug where streamFieldInfo might not have been passed into custom merge functions for

    • fixed

      Fix Missing field errors being logged when writing @defer results where a parent field is selected both inside and outside of a deferred fragment. Fields whose @defer boundary has not been delivered from the network are no longer reported as missing.

    • fixed

      Unregister the watch when an immediate cache.watch broadcast throws. Previously the watch was added to the cache before its first read, and a read that threw left the watch registered while the caller never received the unsubscribe function, so it could not be removed and every later broadcast ran into the same failing read.

    • fixed

      Defer20220824Handler: fix a situation where dataState would show up as completed with incremental errors instead of staying streaming.

  3. 4.3.3

    8 Oct 20261 fix
    • fixed

      Fix a memory leak in isDeferredFragment/isStreamField

  4. 4.3.2

    5 Oct 20261 fix
    • fixed

      Fix an unhandled AbortError promise rejection that occurred when unsubscribing from a multipart HTTP subscription.

  5. 4.3.1

    18 Sep 20261 fix
    • fixed

      Fix an issue where useLazyQuery did not rerender with new variables until the network request had completed when calling execute with new variables while a request was already in-flight.

  6. 4.3.0

    11 Sep 202618 new · 17 fixes
    • new

      Field policies and inputObjects can now tell the cache whether a field is a list of scalars or a scalar whose value is an array. Previously all arrays were iterated and only the inner type was provided to the scalar parse/serialize functions.

    • new

      Adds Scalar.fromGraphQLScalarType helper to create a Scalar instance from an existing graphql.js GraphQLScalarType.

    • new

      The minimum supported TypeScript version is now 5.9.x.

    • new

      Adds the plumbing and types implementation for declaring custom scalars and configuring custom scalars in InMemoryCache.

  7. 4.2.12

    14 Aug 20261 fix
    • fixed

      Preserve multi-byte UTF-8 characters split across multipart response chunks.

  8. 4.2.11

    11 Aug 20261 new · 1 fix
    • new

      Add a development-only warning when a network result is written to the cache but reading the query back from the cache returns a partial result. This usually points at a merge or read function that did not repair missing fields in the cache, which prevents Apollo Client from applying the cache result to the data received by the network.

    • fixed

      Fix type signature of some DocumentationTypes to fix their display in our documentation.

20 other lines we could not sort, mostly version bumps
  • Version bump to rc.

    4.2.0
  • Extend the defaultOptions type-safety work to client.mutate and useMutation.

    4.2.0
  • Extend the defaultOptions type-safety work to preloadQuery (returned from createQueryPreloader). Defaults declared in DeclareDefaultOptions.WatchQuery now work with preloadQuery to ensure the PreloadedQueryRef's data states are correctly set.

    4.2.0
  • Synchronize method and hook return types with defaultOptions.

    4.2.0
  • The optional subscribeAndCount testing utility exported from @apollo/client/testing/core now takes a single generic TResult type parameter, instead of TData. This type will typically be inferred from the observable argument type, but if you have any explicit calls to subscribeAndCount<TData>(...) in your own codebase, you may need to adjust those calls accordingly.

    3.7.0
  • Calling fetchMore for queries using the cache-and-network or network-only fetch policies will no longer trigger additional network requests when cache results are complete. Instead, those complete cache results will be delivered as if using the cache-first fetch policy.

    3.6.0
  • Reimplement useQuery and useLazyQuery to use the proposed useSyncExternalStore API from React 18.

    3.6.0
  • The internal use of options.fetchBlockingPromise by useQuery and useLazyQuery may 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.6.0
  • [Relevant if you use Apollo Client with React Native] Since Apollo Client v3.5.0, CommonJS bundles provided by @apollo/client use a .cjs file 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, whose resolver.sourceExts configuration does not include the cjs extension by default.

    3.5.4
  • Remove npm from dependencies, and avoid referencing graphql-js enum value.

    3.5.1

13 internal lines (docs, tests, tooling) left out.