Skip to content

kev711/books-api

 
 

Repository files navigation

Logo

Build Status Slack Quality Gate Status

GraphQL books API made using Spring Boot and DGS. This is a sibling project of the Book Project.

Setup

Prerequisites:

  • JDK 11 or higher
  • Configure Lombok
  • MySQL 8.0.* or (better) Docker

Recommended IntelliJ plugin: JS GraphQL

Running the app

  1. Import as a Gradle project into your favourite IDE
  2. Start the MySQL Database or run the docker-compose file docker-compose up -d (you may need to add sudo to this command)
  3. Set the active Spring profile to dev (see how to do this in IntelliJ)
  4. Run BooksApiApplication.java
  5. Go to localhost:8080/graphiql

Sample query:

{
  findAllBooks {
    title
    authors {
      fullName
    }
    genre
    isbn13
    yearOfPublication
    format
  }
}

Access database

To access the MySQL database when docker-compose is running:

  1. Go to http://localhost:8081
  2. Log in with the details below:
    • Username: root
    • Password: rootpassword

Contributing

If you wish to contribute (thanks!), please first see the contributing document.

About

GraphQL Books API

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%