@apollo/client@4.3.0-alpha.5
📦 apollo-clientView on GitHub →
🐛 8 fixes🔧 8 symbols
Summary
This release addresses several issues related to `@defer` fragments and `@stream` fields, improving predictability and data handling for partial results and network errors. A `label` argument is now added to `@defer` directives for disambiguation.
Migration Steps
- A `label` argument is now added to all outgoing `@defer` directives when using the `GraphQL17Alpha9Handler`.
🐛 Bug Fixes
- Fix issue where sibling `@defer` fragments were pruned incorrectly when at least one of the `@defer` fragments wasn't delivered.
- Fix an issue where a `network-only` query leaked partial cache data for `@defer` fragments that were not delivered by the network due to an error that bubbled to the `@defer` fragment boundary.
- Fix an issue where a sibling non-deferred fragment might be accidentally pruned when the `@defer` fragment hadn't been delivered.
- Fix issue where the wrong `dataState` was returned when there was nothing written to the cache and a `@defer` fragment was marked pending.
- Fix issue where setting `returnPartialData: true` might report the wrong `dataState` when partial data was written to the cache and `@defer` fragments were pending.
- Fix an issue where a `@defer` query reported the `dataState` as `complete` instead of `streaming` when an error occurs on a deferred field that bubbled to the defer boundary.
- Fix an issue where a cache write in the middle of polling would remain as the query value if future poll requests returned deep equal results to previous polling results.
- Fix an invariant error thrown when a `@defer` boundary received a payload after it had already been marked complete.