This is a demo of how to use GraphQL subscriptions with Apollo Server and Apollo Client to create a real-time chat application.
To run the server, navigate to the server
directory and run the following commands:
npm install
npm start
This will start the server on http://localhost:4000
.
To run the client, navigate to the client
directory and run the following commands:
npm install
npm start
This will start the client on http://localhost:3000
.
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.
This is a simple demo, but if you'd like to contribute, please feel free to open an issue or a pull request.