https://github.com/micmro/soliloquy-server
Graphql Server for Soliloquy single-user chat app.
https://github.com/micmro/soliloquy-server
Last synced: 10 months ago
JSON representation
Graphql Server for Soliloquy single-user chat app.
- Host: GitHub
- URL: https://github.com/micmro/soliloquy-server
- Owner: micmro
- License: mit
- Created: 2017-07-17T16:36:22.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-19T14:35:52.000Z (almost 9 years ago)
- Last Synced: 2025-06-09T07:03:11.266Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# soliloquy-server
Graphql Server for Soliloquy single-user chat app.
# Setup
```
yarn install
yarn start
```
## Run test
```
yarn test
```
or with coverage
```
yarn coverage
```
# GraphQL Endpoint
The GraphQL endpoint is available under [`/graphql`](http://localhost:8080/graphql)
# GraphiQL Endpoint
To see the inteactive GraphiQL UI open [`/graphiql`](http://localhost:8080/graphql)
# Sample Queries
## get all data for a user
```
{
user(id: "1") {
name,
initials,
entries {
id,
message,
created,
edited
}
}
}
```
## createEntry
```
mutation {
createEntry(newEntry: {message: "hope is a good thing 1"}) {
id,
message,
created,
edited
}
}
```
## updateEntry
```
mutation {
updateEntry(id: "entry_4", changes: {message: "update"}) {
id
message
created
edited
}
}
```
## deleteEntry
```
mutation {
deleteEntry(id: "entry_2") {
id
}
}
```