Skip to content

Instantly share code, notes, and snippets.

View cgodkin's full-sized avatar

Carl Godkin cgodkin

  • Dynamic Graphics, Inc
View GitHub Profile
@cgodkin
cgodkin / Notification.ts
Created September 20, 2021 23:50
Using subscriptions with generated CRUD resolvers
import { Field, MiddlewareFn, ObjectType, Resolver, Root, Subscription } from 'type-graphql';
import { PubSub } from 'graphql-subscriptions';
export const pubSub = new PubSub();
@ObjectType()
export class Notification {
@Field((type) => String)
query: string;