Skip to content

Commit 5a92745

Browse files
fnoopAkryum
authored andcommitted
feat: Add query key as additional parameter to result callback, closes #445 (#448)
* Add query key as additional parameter to result callback, #445 * Add subscription key as additional parameter to result callback, #445
1 parent 36733c3 commit 5a92745

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/smart-query.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export default class SmartQuery extends SmartApollo {
144144
}
145145

146146
if (hasResultCallback) {
147-
this.options.result.call(this.vm, result)
147+
this.options.result.call(this.vm, result, this.key)
148148
}
149149
}
150150

src/smart-subscription.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default class SmartSubscription extends SmartApollo {
5656
super.nextResult(data)
5757

5858
if (typeof this.options.result === 'function') {
59-
this.options.result.call(this.vm, data)
59+
this.options.result.call(this.vm, data, this.key)
6060
}
6161
}
6262
}

0 commit comments

Comments
 (0)