Based on this tutorial from pluralsight.
- Spring Boot
- GraphQL tools
- H2 embedded via JPA
- JDK 1.8
- start the application
./gradlew clean bootRun
- visit the database console
- visit the graphqli console
- see the json schema for graphql
Some exampled data you can use for the graphql console.
{
findAllBooks {
id title author
{
firstName lastName
}
}
}
mutation {
newAuthor(
firstName: "JRR",
lastName: "Tolkien"
)
}
{
findAllAuthors {
firstName
lastName
id
}
}
mutation {
newBook(
title: "The Fellowship of the Ring",
isbn: "978-0395489314",
pageCount: 432,
author:2
) {
id
}
}