Demo GraphQL APIs with Spring Boot 3.x
- Error Handling
- Input Validation
- JWT AuthN and AuthZ
- Use
.env
for sensitive properties
Make a copy
.env.template
as.env
in the subproject root
Add any environment variables that you want to overwrite in application.yml
gradle :services:spring-graphq-r2dbc:clean
gradle :services:spring-graphq-r2dbc:bootRun
# to use environment specific profiles
SPRING_PROFILES_ACTIVE=local gradle :services:spring-graphq-r2dbc:bootRun
# or
gradle :services:spring-graphq-r2dbc:bootRun -Dspring.profiles.active=local
open http://localhost:8080/graphiql
Login: admin : nimda
add token in JSON format in the
graphiql
Web Console under headers section.
{
"Authorization": "Basic YWRtaW46bmltZGE="
}
http :8080/actuator/info
http :8080/actuator/health
http :8080/actuator/metrics # this should fail with 401
http -a actuator:rotautca :8080/actuator/metrics
http -a actuator:rotautca :8080/actuator
http -a actuator:rotautca :8080/actuator/metrics/spring.security.http.secured.requests
http -a actuator:rotautca :8080/actuator/metrics/jvm.info
http -a actuator:rotautca :8080/actuator/flyway
http -a actuator:rotautca :8080/actuator/env
gradle :services:spring-graphq-r2dbc:test
gradle :services:spring-graphq-r2dbc:integrationTest
gradle :services:spring-graphq-r2dbc:flywayInfo
gradle :services:spring-graphq-r2dbc:flywayBaseline
gradle :services:spring-graphq-r2dbc:flywayClean
gradle :services:spring-graphq-r2dbc:flywayMigrate
gradle :services:spring-graphq-r2dbc:flywayValidate
gradle :services:spring-graphq-r2dbc:flywayUndo
gradle :services:spring-graphq-r2dbc:flywayRepair