Minor Changes
-
#12923
2aa31c7
Thanks @jerelmiller! - Fix an issue where deferred payloads that reteurned arrays with fewer items than the original cached array would retain items from the cached array. This change includes@stream
arrays where stream arrays replace the cached arrays. -
#12926
c7fba99
Thanks @jerelmiller! - Support the newer incremental delivery format for the@defer
directive implemented ingraphql@17.0.0-alpha.9
. Import theGraphQL17Alpha9Handler
to use the newer incremental delivery format with@defer
.import { GraphQL17Alpha9Handler } from "@apollo/client/incremental"; const client = new ApolloClient({ // ... incrementalHandler: new GraphQL17Alpha9Handler(), });
[!NOTE]
In order to use theGraphQL17Alpha9Handler
, the GraphQL server MUST implement the newer incremental delivery format. You may see errors or unusual behavior if you use the wrong handler. If you are using Apollo Router, continue to use theDefer20220824Handler
because Apollo Router does not yet support the newer incremental delivery format. -
#12918
562e219
Thanks @jerelmiller! - Add support for the@stream
directive on both theDefer20220824Handler
and theGraphQL17Alpha2Handler
.[!NOTE]
The implementations of@stream
differ in the delivery of incremental results between the different GraphQL spec versions. If you upgrading from the older format to the newer format, expect the timing of some incremental results to change.
Patch Changes
-
#12925
f538a83
Thanks @jerelmiller! - Fix an issue where callingfetchMore
with@defer
or@stream
would not rerender incremental results as they were streamed. -
#12923
01cace0
Thanks @jerelmiller! - Improve the cache data loss warning message whenexisting
orincoming
is an array.