Skip to content

Commit d04f0bf

Browse files
committed
Add changeset
1 parent a927fe3 commit d04f0bf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.changeset/witty-llamas-drum.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@apollo/client": major
3+
---
4+
5+
Add a new `dataState` property to `ApolloQueryResult` that determines whether the `data` property is a complete result or not. As such, the `ApolloQueryResult` type is now a discriminated union that better handles the type of `data` given its particular state. The values are:
6+
7+
- `none`: No data could be fulfilled from the cache or the result is incomplete. `data` is `undefined`.
8+
- `partial`: Some data could be fulfilled from the cache but `data` is incomplete. This is only possible when `returnPartialData` is `true`.
9+
- `hasNext`: `data` is incomplete as a result of a deferred query and the result is still streaming in.
10+
- `complete`: `data` is a fully satisfied query result fulfilled either from the cache or network.

0 commit comments

Comments
 (0)