Change8

Migrating to Apollo Client @apollo/client@4.1.0-rc.0

Version @apollo/client@4.1.0-rc.0 introduces 1 breaking change. This guide details how to update your code.

Released: 1/7/2026

1
Breaking Changes
3
Migration Steps
5
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

Cache.writeQueryCache.writeCache.updateExtensionsWithStreamInfoDefer20220824Handler

Breaking Changes

Issue #1

The default stream merge function is now applied to `@stream` fields only when stream info is present. The older `Defer20220824Handler` will no longer use the default merge function and will truncate the streamed array on the first chunk. Update handlers or provide stream info to avoid truncation.

Migration Steps

  1. 1
    If you use `Defer20220824Handler`, verify that stream info is provided; otherwise the streamed array will be truncated on the first chunk. Consider switching to a handler that supplies stream info or adjust your logic accordingly.
  2. 2
    Import and use the new `ExtensionsWithStreamInfo` type when working with `Cache.writeQuery`, `Cache.write`, or `Cache.update` if you need to access stream information in custom cache implementations.
  3. 3
    No code changes are required to benefit from the `WeakRef` delivery of `streamInfo` unless you directly manipulate the extensions object.

Release Summary

Added stream‑info handling improvements, exposed a new type for cache extensions, and fixed redundant merge calls, with a breaking change affecting the legacy `Defer20220824Handler`.

Need More Details?

View the full release notes and all changes for Apollo Client @apollo/client@4.1.0-rc.0.

View Full Changelog