This repository demonstrates using the Micronaut framework to create a GraphQL implementation of a simple movie service. The backend is powered by a very simple JDBC H2 database.
- Run
./gradlew run
-
Import the Gradle project into your IDE of choice (_note that your IDE must support annotation processing... see Micronaut IDE Setup for more information).
-
Run the
com.znetdevelopment.movies.Application
main class
-
Load GraphiQL editor @ http://localhost:8080/static/graphiql.html
-
Use the following example
query {
movies {
name
category { name }
duration
description
director {
firstName
lastName
directedMovies {
name
}
}
actors {
firstName
lastName
actedInMovies { name }
}
}
}