sendMessage.js 296 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 import { isAuthenticated, prisma } from "../../../utils"; import { NEW_MESSAGE_TOPIC } from "../../../topics"; export default { Subscription: { sendMessage: { subscribe: async (_, __, { request, pubsub }) => { pubsub.asyncIterator(NEW_MESSAGE_TOPIC); }, }, }, };