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 fc6230c commit 674a2d7Copy full SHA for 674a2d7
packages/db/src/subscription.js
@@ -150,15 +150,17 @@ export class GQLSub {
150
151
const { cbk } = this;
152
if (cbk) {
153
- if (this.operation !== 'subscription') {
+ if (this.operation !== 'mutation') {
154
// drop this sub from
155
- this.off();
156
- cbk({ data: tree });
157
- } else {
+ if (Object.keys(deps.index).length === 0) {
+ this.off();
+ }
158
cbk({
159
data: tree,
160
off: () => this.off(),
161
});
162
+ } else {
163
+ cbk({ data: tree });
164
}
165
166
0 commit comments