Migrating to Apollo Client v3.14.0-alpha.0
Version v3.14.0-alpha.0 introduces 1 breaking change. This guide details how to update your code.
Released: 6/27/2025
1
Breaking Changes
5
Migration Steps
10
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
queryRef.toPromisepreloadQuery.toPromiseApolloClientInMemoryCacheMockedProvideraddTypenamecanonizeResultscache.gcaddTypenameTransformfragmentsBreaking Changes
●Issue #1
`queryRef.toPromise()` has been removed in Apollo Client 4.0. Use `preloadQuery.toPromise(queryRef)` instead. Update code to call the new method.
Migration Steps
- 1Replace all calls to `queryRef.toPromise()` with `preloadQuery.toPromise(queryRef)`.
- 2Review console warnings for deprecated React API options/methods and update to supported alternatives.
- 3Check for usage of deprecated ApolloClient options/methods and migrate to the recommended APIs.
- 4If using `addTypename` in InMemoryCache or MockedProvider, remove or replace it.
- 5If using `canonizeResults`, stop using it as it is deprecated.
Release Summary
Apollo Client 4.0 introduces the new `preloadQuery.toPromise` API and removes the old `queryRef.toPromise`, while adding numerous deprecation warnings across React APIs, ApolloClient options, and cache settings. A bug fix prevents field policies from incorrectly merging into supertype policies.
Need More Details?
View the full release notes and all changes for Apollo Client v3.14.0-alpha.0.
View Full Changelog