GraphQL Subscriptions


        #GraphQL subscription
        subscription PostSubscription($input: PostSubscriptionInput) {
            postSubscribe(input: $input) {
                comment {
                    author,
                    content
                }
            }
        }
    

        #GraphQL subscription result
        {
            "data": {
                "postSubscribe": {
                    "comment": {
                        "author": "foo",
                        "content": "bar"
                    }
                }
            }
        }
    

Event-based subscription approach (Event Bus)

Currently in working draft specification but already available thanks to graphql-js.