Skip to content

Commit a54baa1

Browse files
authored
Merge pull request #21 from glendaviesnz/watchseries-update
Add details about notifyOnNetworkStatusChange and returnPartialData
2 parents a95bd07 + a15fbfd commit a54baa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/source/queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ProfileComponent implements OnInit {
4444
}
4545
```
4646

47-
The service's `watchQuery` method returns and `Observable` of the query result ([`ApolloQueryResult`][ApolloQueryResult]). We can see that result object contains `loading`, a Boolean indicating if the query is "in-flight", and (once the query has completed) `data` object with `currentUser`, the field we've picked out in `CurrentUserForProfile`.
47+
The service's `watchQuery` method returns an `Observable` of the query result ([`ApolloQueryResult`][ApolloQueryResult]). We can see that the result object contains `loading`, a Boolean indicating if the query is "in-flight". The observable will only emit once when the query is complete, and `loading` will be set to false, unless you set the `watchQuery` paramaters `notifyOnNetworkStatusChange` or `returnPartialData` to true. Once the query has completed it will also contain a `data` object with `currentUser`, the field we've picked out in `CurrentUserForProfile`.
4848

4949
We can expect the `data.currentUser` to change as the logged-in-ness of the client and what it knows about the current user changes over time. That information is stored in Apollo Client's cache, and you can read more about techniques to bring the cache up to date with the server in the [article on the subject](cache-updates.html).
5050

0 commit comments

Comments
 (0)