Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 884 Bytes

README.md

File metadata and controls

43 lines (28 loc) · 884 Bytes

graphql-yoga-Subscriptions

This project demonstrates different ways of using GraphQL Subscriptions in graphql-yoga server.

Getting Started

# Install dependencies
npm install

# Start server
npm run dev

Open http://localhost:4000 in your browser and try the below queries:

Sample Queries

Call helloMutation to trigger subscriptions. Run helloMutation in one tab and any of the subscription queries in another tab to see the subscriptions in action.

mutation helloMutation {
  hello(topicId: "abc")
}

subscription hello {
  hello
}

subscription notification {
  notification(topicId: "abc")
}

subscription protectedNotification {
  protectedNotification
}

License

This project is licensed under the MIT License - see the LICENSE file for details