1type Subscription {
2 post: PostSubscription
3}
4
5type PostSubscription {
6 postAdded: Post
7}
8
1Subscription: {
2 post: () => ({
3 PostSubscription: {}
4 })
5},
6PostSubscription: {
7 postAdded: {
8 subscribe: () => pubSub.asyncIterator(['postAdded'])
9 }
10}
11
1"apollo-server-express": "1.3.6",
2"apollo-server-module-graphiql": "1.3.4",
3"graphql-subscriptions": "0.5.8",
4"graphql": "0.13.2",
5