We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6177036 commit 0661461Copy full SHA for 0661461
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "vue-apollo",
3
- "version": "1.2.1",
+ "version": "1.2.2",
4
"description": "Vue apollo integration",
5
"main": "index.js",
6
"scripts": {
src/smart-apollo.js
@@ -12,12 +12,11 @@ class SmartApollo {
12
13
// Query callback
14
if (typeof this.options.query === 'function') {
15
- const queryCb = this.options.query
16
- this.vm.$watch(queryCb.bind(this.vm), query => {
+ const queryCb = this.options.query.bind(this.vm)
+ this.options.query = queryCb()
17
+ this.vm.$watch(queryCb, query => {
18
this.options.query = query
19
this.refresh()
- }, {
20
- immediate: true,
21
})
22
}
23
0 commit comments