Skip to content

Commit f8177d5

Browse files
nachocabGuillaume Chau
authored and
Guillaume Chau
committed
Fix typos in README (#123)
1 parent 88aba18 commit f8177d5

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Integrates [apollo](http://www.apollostack.com/) in your [Vue](http://vuejs.org)
4646

4747
## Installation
4848

49-
Try and install this packages before server side set (of packages), add apollo to meteor.js before then, too.
49+
Try and install these packages before server side set (of packages), add apollo to meteor.js before then, too.
5050

5151
npm install --save vue-apollo apollo-client
5252

@@ -287,13 +287,13 @@ apollo: {
287287
},
288288
```
289289

290-
**This will called once when the component is created and it must return the option object.**
290+
**This will be called once when the component is created and it must return the option object.**
291291

292292
*This also works for [subscriptions](#subscriptions).*
293293

294294
### Reactive query definition
295295

296-
You can use a function for the `query` option, that will update the graphql query definition automatically:
296+
You can use a function for the `query` option. This will update the graphql query definition automatically:
297297

298298
```javascript
299299
// The featured tag can be either a random tag or the last added tag
@@ -404,10 +404,10 @@ this.$apollo.queries.tags.skip = true
404404
These are the available advanced options you can use:
405405
- `update(data) {return ...}` to customize the value that is set in the vue property, for example if the field names don't match.
406406
- `result(ApolloQueryResult)` is a hook called when a result is received (see documentation for [ApolloQueryResult](http://dev.apollodata.com/core/apollo-client-api.html#ApolloQueryResult)).
407-
- `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.
408-
- `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.
409-
- `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.
410-
- `manual` is a boolean that disable the automatic property update. You then need to specify a `result` callback (see example below).
407+
- `error(error)` is a hook called when there are errors. `error` is an Apollo error object with either a `graphQLErrors` property or a `networkError` property.
408+
- `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; when it is no longer loading, it will be decremented by 1. That way, the property can represent a counter of currently loading queries.
409+
- `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 loading, or `-1` when the query is no longer loading.
410+
- `manual` is a boolean to disable the automatic property update. If you use it, you then need to specify a `result` callback (see example below).
411411

412412

413413
```javascript
@@ -562,7 +562,7 @@ created () {
562562

563563
## Mutations
564564

565-
Mutations are queries that changes your data state on your apollo server. For more info, visit the [apollo doc](http://dev.apollodata.com/core/apollo-client-api.html#ApolloClient\.mutate).
565+
Mutations are queries that change your data state on your apollo server. For more info, visit the [apollo doc](http://dev.apollodata.com/core/apollo-client-api.html#ApolloClient\.mutate).
566566

567567
```javascript
568568
methods: {
@@ -743,9 +743,9 @@ apollo: {
743743
label
744744
}
745745
}`,
746-
// Variables passed to the subscription
746+
// Variables passed to the subscription. Since we're using a function,
747+
// they are reactive
747748
variables () {
748-
// Reactive if a function (like previously)
749749
return {
750750
param: this.param,
751751
}
@@ -759,7 +759,7 @@ apollo: {
759759
}
760760
```
761761

762-
*Note that you can pass an array of subscriptions to `subscribeToMore` to subscribe to multiple subcribtions on this query.*
762+
*Note that you can pass an array of subscriptions to `subscribeToMore` to subscribe to multiple subscriptions on this query.*
763763

764764
#### Alternate usage
765765

@@ -906,7 +906,7 @@ apollo: {
906906

907907
You can then access the subscription with `this.$apollo.subscriptions.<name>`.
908908

909-
*Just like queries, you can declare the subscription [with a function](#option-function), and you can declare the `query` option [with a reactive function](#reactive-query-definition).*
909+
*Just like for queries, you can declare the subscription [with a function](#option-function), and you can declare the `query` option [with a reactive function](#reactive-query-definition).*
910910

911911
### Skipping the subscription
912912

@@ -1058,7 +1058,7 @@ export default {
10581058

10591059
## Special options
10601060

1061-
The special options being with `$` in the `apollo` object.
1061+
The special options begin with `$` in the `apollo` object.
10621062

10631063
- `$skip` to disable all queries and subscriptions (see below)
10641064
- `$skipAllQueries` to disable all queries (see below)
@@ -1108,7 +1108,7 @@ this.$apollo.skipAllSubscriptions = true
11081108
this.$apollo.skipAll = true
11091109
```
11101110

1111-
You can also declare these properties in the `apollo` option of the component. It can be booleans:
1111+
You can also declare these properties in the `apollo` option of the component. They can be booleans:
11121112

11131113
```javascript
11141114
apollo: {
@@ -1168,7 +1168,7 @@ On the queries you want to prefetch on the server, add the `prefetch` option. It
11681168
- a function that gets the context object (which can contain the URL for example) and return a variables object,
11691169
- `true` (query's `variables` is reused).
11701170

1171-
If you are returning a variables object in the `prefetch` option make sure it matches with the result of the `variables` option. If they do not match the query's data property will not be populated while rendering the template server-side.
1171+
If you are returning a variables object in the `prefetch` option, make sure it matches the result of the `variables` option. If they do not match, the query's data property will not be populated while rendering the template server-side.
11721172

11731173
**Warning! You don't have access to the component instance when doing prefetching on the server. Don't use `this` in `prefetch`!**
11741174

@@ -1219,7 +1219,7 @@ export default {
12191219
}
12201220
```
12211221

1222-
You can also tell vue-apollo that some components not used in a `router-view` (and thus not in vue-router `matchedComponents`) need to be prefetched, with the `willPrefetch` method:
1222+
You can also tell vue-apollo that some components not used in a `router-view` (and thus, not in vue-router `matchedComponents`) need to be prefetched, with the `willPrefetch` method:
12231223

12241224
```javascript
12251225
import { willPrefetch } from 'vue-apollo'
@@ -1281,7 +1281,7 @@ return new Promise((resolve, reject) => {
12811281
}, matchedComponents),
12821282
]).then(() => {
12831283
// Inject the Vuex state and the Apollo cache on the page.
1284-
// This will prevent unecessary queries.
1284+
// This will prevent unnecessary queries.
12851285

12861286
// Vuex
12871287
js += `window.__INITIAL_STATE__=${JSON.stringify(store.state)};`

0 commit comments

Comments
 (0)