GraphQL books API made using Spring Boot and DGS. This is a sibling project of the Book Project.
Prerequisites:
- JDK 11 or higher
- Configure Lombok
- MySQL 8.0.* or (better) Docker
Recommended IntelliJ plugin: JS GraphQL
- Import as a Gradle project into your favourite IDE
- Start the MySQL Database or run the docker-compose file
docker-compose up -d
(you may need to addsudo
to this command) - Set the active Spring profile to dev (see how to do this in IntelliJ)
- Run
BooksApiApplication.java
- Go to
localhost:8080/graphiql
Sample query:
{
findAllBooks {
title
authors {
fullName
}
genre
isbn13
yearOfPublication
format
}
}
To access the MySQL database when docker-compose is running:
- Go to
http://localhost:8081
- Log in with the details below:
- Username:
root
- Password:
rootpassword
- Username:
If you wish to contribute (thanks!), please first see the contributing document.