Skip to content

Commit 628db5e

Browse files
authored
Update Subscription.js
1 parent f8c88c1 commit 628db5e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

server/src/resolvers/Subscription.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
const newLink = {
22
subscribe: (parent, args, ctx, info) => {
3-
return ctx.db.subscription.link({}, info)
3+
return ctx.db.subscription.link(
4+
{ where: { mutation_in: ['CREATED'] } },
5+
info,
6+
)
47
},
58
}
69

710
const newVote = {
811
subscribe: (parent, args, ctx, info) => {
9-
return ctx.db.subscription.vote({}, info)
12+
return ctx.db.subscription.vote(
13+
{ where: { mutation_in: ['CREATED'] } },
14+
info,
15+
)
1016
},
1117
}
1218

0 commit comments

Comments
 (0)