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 af9f20f commit f31fa15Copy full SHA for f31fa15
packages/vue-apollo-option/src/dollar-apollo.js
@@ -148,7 +148,13 @@ export class DollarApollo {
148
smart.autostart()
149
150
if (options.linkedQuery) {
151
- options.linkedQuery._linkedSubscriptions.push(smart)
+ // prevent subscriptions leak on fetching query with another parameters
152
+ const index = options.linkedQuery._linkedSubscriptions.findIndex(x => x.key === key)
153
+ if (index !== -1) {
154
+ options.linkedQuery._linkedSubscriptions[index] = smart
155
+ } else {
156
+ options.linkedQuery._linkedSubscriptions.push(smart)
157
+ }
158
}
159
160
return smart
0 commit comments