graphql-boilerplates/node-graphql-server

Add subscriptions to advanced

marktani opened this issue · 0 comments

example:

import { Context } from '../utils'

export const Subscription = {
  city: {
    subscribe: async (parent, args, ctx: Context, info) => {
      return ctx.db.subscription.city({}, info)
    },
  },
}