Skip to content

Salmandabbakuti/graphql-yoga-subscriptions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published