node-graphql-server icon indicating copy to clipboard operation
node-graphql-server copied to clipboard

Add subscriptions to advanced

Open marktani opened this issue 7 years ago • 0 comments

example:

import { Context } from '../utils'

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

marktani avatar Jan 03 '18 20:01 marktani