Change8

Migrating to Apollo Client @apollo/client@4.0.4

Version @apollo/client@4.0.4 introduces 1 breaking change. This guide details how to update your code.

Released: 9/2/2025

1
Breaking Changes
3
Migration Steps
6
Affected Symbols

⚠️ Check Your Code

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

useMutationmutateuseQueryskipTokenequal@wry/equality

Breaking Changes

Issue #1

The default export from "@wry/equality" was removed. Code that imported the equality function as a default import must be updated to use the named export `equal`.

Migration Steps

  1. 1
    Replace any default import of the equality helper from "@wry/equality" with a named import: `import { equal } from "@wry/equality";`.
  2. 2
    When skipping a query, replace `skip: true` with the `skipToken` value imported from "@apollo/client/react".
  3. 3
    Ensure that code handling the promise returned by `mutate` includes proper rejection handling or relies on the library's built‑in handling.

Release Summary

This patch release adds a type‑safe `skipToken` for query skipping, fixes unhandled promise rejections and invariant handling, and switches to a named `equal` export from `@wry/equality`, which requires import updates.

Need More Details?

View the full release notes and all changes for Apollo Client @apollo/client@4.0.4.

View Full Changelog