Packages

@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

Other targets from 4.1.9Newest 4.x, Latest4.3.5
0
changes to make
0
advisories fixed
4
new
4
fixes

Release by release

  1. 4.2.0

    20 May 20264 new · 4 fixes
    • new

      Introduce "classic" and "modern" method and hook signatures.

    • new

      Improve the accuracy of client.query return type to better detect the current errorPolicy. The data property is no longer nullable when the errorPolicy is none. This makes it possible to remove the undefined checks 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 the defaultHandler constructor option or the setDefaultEventHandler instance method.

4 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