Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wayofthepie/watcher
https://github.com/wayofthepie/watcher
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/wayofthepie/watcher
- Owner: wayofthepie
- Created: 2017-10-11T22:38:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-11T22:56:18.000Z (about 7 years ago)
- Last Synced: 2024-11-06T03:44:32.961Z (about 2 months ago)
- Language: Kotlin
- Size: 55.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Note
Until https://github.com/graphql-java/graphql-spring-boot/pulls is merged, you
will have to locally build the graphql-spring-boot-starter from the version in
that pull request.# Spring/Kotlin/GraphQL
Quick example of Spring, Kotlin and GraphQL.# Sample Mutations And Queries
First, launch a redis instance, quickest way is docker:```
$ docker run -ti --rm --name redis -p 6379:6379 redis
```The connection config is hardcoded in the code to localhost:6379.
Next, run `./gradlew bootRun`, and navigate to http://localhost:8080/graphiql. Now create a Human!Request:
```
mutation {
writeHuman(name:"test") {
id
}
}
```Response:
```
{
"data": {
"writeHuman": {
"id": "some-uuid"
}
}
}
```Now find your human!
Request:
```
query {
human(id:"some-uuid") {
id
name
}
}
```Response:
```
{
"data": {
"human": {
"id": "some-uuid",
"name": "test"
}
}
}
```