This is an implementation of GraphQL Tutorial for Java using Clean Architecture principles. This application also gives an example of how to use GraphQL with data stored in a database.
The purpose of this project is learning GraphQL technology, how to develop and how to test it.
$ mvn spring-boot:run
Application will be available at http://localhost:8080/graphql .
The sample query below searches for books that contains the word "Tower" in the name, returns book and its author information:
curl \
-X POST \
-H "Content-Type: application/json" \
--data '{ "query" : "{ bookByName(name: \"Tower\"){ id name pageCount author { firstName lastName } } }" }' \
http://localhost:8080/graphql
You can navigate through all data provided by this application visiting this file.
- Maven - Dependency Management.
- Spring-Boot - Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".
- GraphQL - GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.
- H2 Database - In-memory database.