This module implements a Relay.js-compatible GraphQL server. It also supports OSGi out of the box.
You can download it from bintray (Gradle syntax):
repositories {
mavenCentral()
}
dependencies {
compile 'com.graphql-java:graphql-java-servlet:0.6.3'
}The are a few important components this package provides:
- GraphQLQueryProvider/GraphQLMutationProvider interfaces. These will allow you to define which "domain model" views and which mutations you are going to expose.
- GraphQLServlet as an entry point servlet. Use
bindQueryProvider/bindMutationProvideror automatically wire them in OSGi.
Both GET and POST are supported. In POST, plain request body with a JSON is supported, as well as a multipart with a part called 'graphql'.