Chat API service coded with Node.js using Express and GraphQL coded in ES6 GraphiQL UI accessible through the /graphiql URL Apollo Engine plateform accessible through author account services
Have Node.js installed. For the Apollo Server plateform have an account and demand permissions on the service.
Install all packages:
npm install
Currently running on localhost:4000
npm start
- getMessages(room: String!, since: Int): [Message!]
query{
getMessage(room:"1"){
id
message
}
}
query{
getMessage(room:"1", since: 1){
id
message
}
}
- postMessage(message: String!, room: String!, userHash: String): Message!
mutation{
postMessage(message: "hello", userHash:"lalala", room:"3"){
message
userHash
room
}
}
- Express.js
- Apollo
- GraphQL