Adding Subscriptions To Schema
Adding GraphQL subscriptions to your GraphQL schema is simple, since subscriptions is just another GraphQL operation type like Query and Mutation -
You specify openration type, then the operation name and you can customize the publication data with a selection set and arguments.
You need to create a root schema definition and a root resolver for your
Subscription root, just like with Query and Mutation:
Create a resolver just like queries and mutations if you need to perform a logic over the published data: