An open API service indexing awesome lists of open source software.

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!

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.