@apollo/client
4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed
Upgrading @apollo/client from 4.1.9 to 4.2.0
1 release in betweenevery note read
Release by release
- new
Introduce "classic" and "modern" method and hook signatures.
- new
Improve the accuracy of
client.queryreturn type to better detect the currenterrorPolicy. Thedataproperty is no longer nullable when theerrorPolicyisnone. This makes it possible to remove theundefinedchecks or optional chaining in most cases. - new
Add support for automatic event-based refetching, such as window focus.
- new
Add the ability to override the default event handler on
RefetchEventManager. The default handler runs when no per-source handler is configured for an event. Provide a custom handler via thedefaultHandlerconstructor option or thesetDefaultEventHandlerinstance method.
- 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.