Use GraphQL subscriptions from your NodeJS code
Setting up your NodeJS code to use GraphQL subscriptions involves going through a few hoops.
Using GraphQL subscriptions from your NodeJS code is especially useful if you want to react to events or changes on a GraphQL backend
We’ve setup a simple boilerplate to help you get GraphQL subscriptions setup at: https://github.com/hasura/nodejs-graphql-subscriptions-boilerplate.
![](https://hasura.io/blog/content/images/downloaded_images/use-graphql-subscriptions-from-your-nodejs-code-988132c542d9/1-JokDua7r6Bof0G8A9DBSfw.gif)
Related reading