class GraphQL::Schema::Subscription

This class can be extended to create fields on your subscription root.

It provides hooks for the different parts of the subscription lifecycle:

Also, unsubscribe terminates the subscription.