Home / Companies / LogRocket / Blog / Post Details
Content Deep Dive

What’s new in Apollo Client 3

Blog post from LogRocket

Post Details
Company
Date Published
Author
John Au-Yeung
Word Count
1,418
Language
-
Hacker News Points
-
Summary

Apollo Client 3 introduces enhanced caching capabilities with features such as object and field eviction, garbage collection, and the ability to manage local state using reactive variables. The InMemoryCache API now supports custom type and field configurations, including the implementation of custom read functions for handling dangling references and transforming field values. Users can define their own cache field policies, allowing for modifications like setting default values or transforming data before it's retrieved. The update also supports the creation of local fields within the cache, distinguishable from API fields using the @client directive, enabling more flexible management of application state. Additionally, reactive variables offer a new method for storing and updating local state, automatically triggering updates to queries reliant on these variables. These new features aim to provide greater control and customization over data handling, improving the efficiency and functionality of applications using Apollo Client.