Skip to content

Commit 7f8fc7a

Browse files
committed
Readme fix
1 parent aa9b655 commit 7f8fc7a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ This will re-fetch the query each time a parameter changes, for example:
275275
#### Advanced options
276276

277277
These are the available advanced options you can use:
278-
- `update(data) {return ...}` to customize the value that is set in the vue property, for example if the field names don't match
279-
- `result(data)` is a hook called when a result is received
280-
- `error(errors, type)` is a hook called when there are errors, `type` value can either be `'sending'` or `'execution'`
278+
- `update(data) {return ...}` to customize the value that is set in the vue property, for example if the field names don't match.
279+
- `result(data)` is a hook called when a result is received.
280+
- `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.
281281
- `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.
282282
- `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.
283283

@@ -317,8 +317,8 @@ apollo: {
317317
console.log("We got some result!");
318318
},
319319
// Error handling
320-
error(errors, type) {
321-
console.error(`We've got ${errors.length} errors of type '${type}'`);
320+
error(error) {
321+
console.error('We\'ve got an error!', error);
322322
},
323323
// Loading state
324324
// loadingKey is the name of the data property

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-apollo",
3-
"version": "1.0.0-beta4",
3+
"version": "1.0.0-beta5",
44
"description": "Vue apollo integration",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)