This repository holds example code implementing spring-boot-starter-graphql in an easy to follow, no frills application.
This solution that combines and extends the following two tutorials and implements best practices for working with graphQL: https://www.graphql-java.com/tutorials/getting-started-with-spring-boot/ https://www.baeldung.com/spring-graphql
- Download this project from source control
- Run the SpringBoot Application Main class (src/main/java/org/example/Main.java)
- Copy an example Query, such as listBooks, from exampleQueries (src/main/resources/exampleQueries)
- Navigate to http://localhost:8080/graphiql
- Paste your query into the left section and hit the execute query button
- The example query should execute and show results