Simple Spring WebFlux Project (see Help.md) with:
- Classic Annotation Based REST
- WebFlux.Fn / coRouter REST
- Moved from graphql-kotlin to spring-graphql
- For graphql-kotlin impl. with Spring Boot 2.x.x use #811dcc2
This project uses ktlint
brew install ktlint
ktlint --apply-to-idea
orktlint --apply-to-idea-project
ktlint --install-git-pre-commit-hook
ktlint -F "src/**/*.kt" "*.kts"
- Open
build.gradle.kts
with IntelliJ - Run Application via IntelliJ or
./gradlew bootRun
- graphql Endpoints
Use graphiql to execute queries and browse schema or js-graphql
#default value
query default {
hello {
greeting
time
}
}
#with input
query rob {
hello(name: "Rob") {
greeting
time
}
}
Note The following examples are not migrated from graphql-kotlin yet, for working examples use #811dcc2
- Partial Results / Errors
query hello {
hello(name: "Rob") {
greeting
}
partialBroken {
greeting
}
}
subscription {
hello(name: "Rob") {
greeting
time
}
}
subscription employees {
employees {
firstName
team {
name
}
}
}
mutation newEmployee {
newEmployee(
newEmployee: { firstName: "Tim", lastName: "Test", teamName: "Dev" }
) {
firstName
team {
employees {
firstName
}
}
}
}
- Annotation based:
- Functional:
- GitHub Actions + ArgoCD
- See Deployments
- See Cluster Repo
- To deploy, change the version in the argocd repo and create a PR (you can also manually change the version in argocd for testing (!)):
- services/graphql-reactive