Skip to content

Latest commit

 

History

History

spring-graphql-r2dbc

Spring-GraphQL

Demo GraphQL APIs with Spring Boot 3.x

Features

Setup

Make a copy .env.template as .env in the subproject root
Add any environment variables that you want to overwrite in application.yml

Run

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

GraphQL Web Console

open http://localhost:8080/graphiql

Login: admin : nimda

add token in JSON format in the graphiql Web Console under headers section.

{
    "Authorization": "Basic YWRtaW46bmltZGE="
}

HealthChecks

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

Unit Test

gradle :services:spring-graphq-r2dbc:test
gradle :services:spring-graphq-r2dbc:integrationTest

Maintenance

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