https://github.com/aicirou/realtime-graphql-subscriptions-demo
Simplest demo of Subscription in GraphQL with webSocket!
https://github.com/aicirou/realtime-graphql-subscriptions-demo
apollo-client apollo-server graphql graphql-subscriptions graphql-subscriptions-demo graphql-ws
Last synced: 7 months ago
JSON representation
Simplest demo of Subscription in GraphQL with webSocket!
- Host: GitHub
- URL: https://github.com/aicirou/realtime-graphql-subscriptions-demo
- Owner: Aicirou
- Created: 2024-03-06T15:56:24.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-06T15:56:27.000Z (over 1 year ago)
- Last Synced: 2025-01-13T23:17:24.954Z (9 months ago)
- Topics: apollo-client, apollo-server, graphql, graphql-subscriptions, graphql-subscriptions-demo, graphql-ws
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# realtime-graphql-subscriptions-demo
This is a demo of how to use GraphQL subscriptions with Apollo Server and Apollo Client to create a real-time chat application.
## Running the server
To run the server, navigate to the `server` directory and run the following commands:
```sh
npm install
npm start
```This will start the server on `http://localhost:4000`.
## Running the client
To run the client, navigate to the `client` directory and run the following commands:
```sh
npm install
npm start
```This will start the client on `http://localhost:3000`.
## Using the app
Once the server and client are running, you can open the client in your browser and start sending messages. You can also open multiple clients in different tabs or windows to see the real-time updates.
## Contributing
This is a simple demo, but if you'd like to contribute, please feel free to open an issue or a pull request.