A simple live GraphQL chat app built using React, Node, Apollo Server/Client and TypeGraphQL. There is an option to use Rust async-graphql running on warp server.
- Run
npm i
to install deps - Run
npm run watch
to compile TS files - In another terminal, run
npm run dev
to start the server - Visit
localhost:9000/graphql
to view GraphQL Playground
- Run
npm i
to install deps - Run
npm start
to start the client - Open two browser tabs or more at
localhost:3000
, enter names and start chatting between them.
/graphql
: hascreateChat
mutation andallChats
query resolvers/subscriptions
: hasmessageSent
subscription
Used the following tutorial as a starting point.
OR
Instead of running the TS server you can run Rust warp-server with
- In the client uncomment all "warp-server" and comment the corresponding lines in App.tsx, Chat,tsx and gql.ts
- Run
cargo run
to start the server - Run the client (see above)
- Visit
localhost:8000
to view GraphQL Playground. All queries, mutations and subscriptions are on/
.