@apollo/client
4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed
Upgrading @apollo/client from 3.8.10 to 4.3.5
99 releases in betweennotes for 97
- 17+
- changes to make
- 0
- advisories fixed
- 119+
- new
- 219+
- fixes
Counted from 97 of 99 release notes. Advisories are counted from the advisory database, in full.
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
- deprecated4.3.0
- deprecated3.14.0
- deprecated3.14.0
Release by release
- 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
variablesor when used as a key field value so that cache writes and calls tocache.identifysucceed. - fixed
Require the
variablesoption inuseFragmentwhen the fragment has required variables. This matches the behavior ofuseSuspenseFragmentand the query hooks. - fixed
Parse custom scalar fields in subscription results when using the
no-cachefetch policy.
- fixed
- 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
@deferboundary elsewhere in the query was still pending when using theGraphQL17Alpha9Handler. The results of all selections of the list field are now merged. - fixed
Fixed a bug where
streamFieldInfomight not have been passed into custom merge functions for - fixed
Fix
Missing fielderrors being logged when writing@deferresults where a parent field is selected both inside and outside of a deferred fragment. Fields whose@deferboundary has not been delivered from the network are no longer reported as missing. - fixed
Unregister the watch when an immediate
cache.watchbroadcast 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 wheredataStatewould show up ascompletedwith incremental errors instead of stayingstreaming.
- fixed
- fixed
Fix a memory leak in
isDeferredFragment/isStreamField
- fixed
- fixed
Fix an unhandled
AbortErrorpromise rejection that occurred when unsubscribing from a multipart HTTP subscription.
- fixed
- fixed
Fix an issue where
useLazyQuerydid not rerender with newvariablesuntil the network request had completed when callingexecutewith new variables while a request was already in-flight.
- fixed
- new
Field policies and
inputObjectscan 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 scalarparse/serializefunctions. - new
Adds
Scalar.fromGraphQLScalarTypehelper to create aScalarinstance from an existing graphql.jsGraphQLScalarType. - 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.
- new
- fixed
Preserve multi-byte UTF-8 characters split across multipart response chunks.
- fixed
- 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
mergeorreadfunction 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
DocumentationTypesto fix their display in our documentation.
- new
4 other lines we could not sort, mostly version bumps
- 4.2.0
Version bump to
rc. - 4.2.0
Extend the
defaultOptionstype-safety work toclient.mutateanduseMutation. - 4.2.0
Extend the
defaultOptionstype-safety work topreloadQuery(returned fromcreateQueryPreloader). Defaults declared inDeclareDefaultOptions.WatchQuerynow work withpreloadQueryto ensure thePreloadedQueryRef's data states are correctly set. - 4.2.0
Synchronize method and hook return types with
defaultOptions.
4 internal lines (docs, tests, tooling) left out.