sdy

create subMessage

1 +type Subscription {
2 + subMessage: Message
3 +}
1 +import { ONE_TO_ONE_MESSAGE } from "../../../topics";
2 +
3 +export default {
4 + Subscription: {
5 + subMessage: {
6 + subscribe: async (_, __, { pubsub }) => {
7 + return pubsub.asyncIterator(ONE_TO_ONE_MESSAGE);
8 + },
9 + },
10 + },
11 +};