You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are the available advanced options you can use:
401
401
-`update(data) {return ...}` to customize the value that is set in the vue property, for example if the field names don't match.
402
-
-`result(data)` is a hook called when a result is received.
402
+
-`result(ApolloResult)` is a hook called when a result is received (see documentation for [ApolloResult](http://dev.apollodata.com/core/apollo-client-api.html#ApolloQueryResult)).
403
403
-`error(error)` is a hook called when there are errors, `error` being an Apollo error object with either a `graphQLErrors` property or a `networkError` property.
404
404
-`loadingKey` will update the component data property you pass as the value. You should initialize this property to `0` in the component `data()` hook. When the query is loading, this property will be incremented by 1 and as soon as it no longer is, the property will be decremented by 1. That way, the property can represent a counter of currently loading queries.
405
405
-`watchLoading(isLoading, countModifier)` is a hook called when the loading state of the query changes. The `countModifier` parameter is either equal to `1` when the query is now loading, or `-1` when the query is no longer loading.
@@ -434,7 +434,7 @@ apollo: {
434
434
returndata.ping
435
435
},
436
436
// Optional result hook
437
-
result(data) {
437
+
result({ data, loader, networkStatus }) {
438
438
console.log("We got some result!")
439
439
},
440
440
// Error handling
@@ -1040,20 +1040,27 @@ tags: {
1040
1040
1041
1041
(Work in progress)
1042
1042
1043
+
Use `apolloProvider.collect()` to being collect queries made against this provider. You get a function that returns a promise when all queries collected are ready. Note that the provider stops collecting queries when you call the function.
1044
+
1043
1045
```javascript
1044
-
constensureReady=apolloProvider.collect()
1046
+
constensureReady=apolloProvider.collect({
1047
+
// If set to false, may resolve when partial/cache result is emitted
0 commit comments