Demo project for kabisa coding assignment.
- Java 17
- Maven
- Postgres
- Spring boot
- Webflux
- Liquibase
- Sleuth
- Lombok
Testing frameworks
- Spock
- WireMock
- Testcontainers
How to run the application.
- Make sure Docker desktop is running
- Build jar
clean package
- Build and run docker images
docker-compose up
Api consists of REST and graphql endpoints.
REST endpoint documentation can be found at :
http://localhost:8080/api/webjars/swagger-ui/index.html#/
Graphql endpoint (localhost:8080/graphql
) can be called with example query:
query{
getAllQuotes{
author
quote
}
}
DB is empty on initialization, user first has to retrieve a random quote using the endpoint.
Every time a random quote is retrieved, it is saved in the DB.
For some reason graphql controller keeps showing up in swagger ui. Using @Hidden does not seem to work. Seems te be a known issue : https://stackoverflow.com/questions/71509914/how-to-disable-dgs-graphql-framework-controllers-in-swagger