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

@stream all the things with Apollo Client 4.1

Blog post from Apollo

Post Details
Company
Date Published
Author
Jerel Miller
Word Count
668
Language
English
Hacker News Points
-
Summary

Apollo Client 4.1 introduces significant enhancements, including full support for the @stream directive, advancements in fragment watching capabilities, and improvements to cache handling. The update aligns with the latest GraphQL incremental delivery spec, providing new APIs to handle fragments efficiently, such as allowing arrays to be passed to the useFragment function. This facilitates the simultaneous watching of multiple cache entities, eliminating the need for hoisting item fragments or creating additional components. The release also addresses various bug fixes, such as correcting issues with incremental payloads and ensuring proper rerendering with @defer or @stream directives. Performance is notably improved by deduplicating watches and observables for the same cache objects, and other enhancements include improved client awareness through support for headers transport and the introduction of callback functions as context options on mutations.