@apollo/client
4.3.5 · 19 Oct 2026MIT5.3M / weekRepositoryHomepagenpmAtom feed
Upgrading @apollo/client from 3.4.17 to 3.5.0
1 release in betweenevery note read
Release by release
- new
Add
updateQueryandupdateFragmentmethods toApolloCache, simplifying commonreadQuery/writeQuerycache update patterns. - new
Field directives and their arguments can now be included along with field argument names when using field policy
keyArgs: [...]notation. For example, if you have aQuery.feedfield that takes an argument calledtypeand uses a@connection(key:...)directive to keepfeeddata from different queries separate within the cache, you might configure both using the followingInMemoryCachefield policy: - new
Report single
MissingFieldErrorinstead of a potentially very largeMissingFieldErrorarray for incomplete cache reads, improving performance and memory usage. - new
When writing results into
InMemoryCache, each written object is now identified usingpolicies.identifyafter traversing the fields of the object (rather than before), simplifying identification and reducing duplicate work. If you have customkeyFieldsfunctions, they still receive the raw result object as their first parameter, but theKeyFieldsContextparameter now providescontext.storeObject(theStoreObjectjust processed byprocessSelectionSet) andcontext.readField(a helper function for reading fields fromcontext.storeObjectand anyReferences it might contain, similar toreadFieldforread,merge, andcache.modifyfunctions).
- new