Skip to content

Commit

Permalink
Readme fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Sep 19, 2016
1 parent aa9b655 commit 7f8fc7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ This will re-fetch the query each time a parameter changes, for example:
#### Advanced options

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

Expand Down Expand Up @@ -317,8 +317,8 @@ apollo: {
console.log("We got some result!");
},
// Error handling
error(errors, type) {
console.error(`We've got ${errors.length} errors of type '${type}'`);
error(error) {
console.error('We\'ve got an error!', error);
},
// Loading state
// loadingKey is the name of the data property
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-apollo",
"version": "1.0.0-beta4",
"version": "1.0.0-beta5",
"description": "Vue apollo integration",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 7f8fc7a

Please sign in to comment.