@apollo/client
4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed
3.14.1 is the newest release of 3.x.
In short
2 new1 changed
Release note
Apollo Client 3.5.4 (2021-11-19)
Notices
⚠️ The following advice about
metro.config.jsshould no longer be necessary, as of Apollo Client v3.6.4.
[Relevant if you use Apollo Client with React Native] Since Apollo Client v3.5.0, CommonJS bundles provided by
@apollo/clientuse a.cjsfile extension rather than.cjs.js, so Node.js won't interpret them as ECMAScript modules. While this change should be an implementation detail, it may cause problems for the Metro bundler used by React Native, whoseresolver.sourceExtsconfiguration does not include thecjsextension by default.As a workaround until this issue is resolved, you can configure Metro to understand the
.cjsfile extension by creating ametro.config.jsfile in the root of your React Native project:// NOTE: No longer necessary in @apollo/client@3.6.4! const { getDefaultConfig } = require("metro-config"); const { resolver: defaultResolver } = getDefaultConfig.getDefaultValues(); exports.resolver = { ...defaultResolver, sourceExts: [...defaultResolver.sourceExts, "cjs"], };
Improvements
Restore the ability to pass
onError()andonCompleted()to the mutation execution function. @brainkimWork around webpack 5 errors of the form
The request 'ts-invariant/process' failed to resolve only because it was resolved as fully specified
by ensuring
import ... from 'ts-invariant/process'is internally written toimport ... from 'ts-invariant/process/index.js'.
@benjamn in #9083