graphql-js icon indicating copy to clipboard operation
graphql-js copied to clipboard

Subscriptions not showing after mutation

Open Andrew1325 opened this issue 6 years ago • 0 comments
trafficstars

I know this issue has been raised before in #14 but I feel this must be a different problem as the previous issue is over a year old and appears to have been resolved.

I have followed the tutorial exactly and everything works except the subscriptions. They sit there saying 'Listening...' but never show data.

This is the vote subscription

function newVoteSubscribe (parent, args, context, info) {
  return context.prisma.$subscribe.vote({ mutation_in: ['CREATED'] }).node()
}

const newVote = {
  subscribe: newVoteSubscribe,
  resolve: payload => {
    return payload
  }
}

which appears to be as it should compared to the repo on here and I don't get an error, simply no response in playground. I've tried adding where: { mutation_in... and an empty object in vote() but it makes no difference. The newLinkSubscribe is the same.

Andrew1325 avatar Apr 07 '19 07:04 Andrew1325