Last active
August 14, 2020 11:32
-
-
Save velotiotech/94f2c9481e27212f16f768a57b41b144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const newVote = context.prisma.vote.create({ | |
data: { | |
user: { connect: { id: userId } }, | |
link: { connect: { id: Number(args.linkId) } }, | |
} | |
}) | |
context.pubsub.publish("NEW_VOTE", newVote) | |
return newVote | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment