Note: This library is currently under development and not yet stable. GraphQL itself is just a working draft currently. So there will be changes!
This is a GraphQL Java implementation based on the specification and the JavaScript reference implementation.
The execution part is WIP, and validation, error handling and more is still missing.
A complex schema (stolen from the js reference implementation): StarWarsSchema
For how to define a simple schema and execute queries: GraphQL Test
More complex use cases: StarWars query tests
Just clone the repo and type
./gradlew buildIn build/libs you will find the jar file.
./gradlew testgraphql-java is based on the same idea as the reference implementation: It assumes nothing about the persistence technology. Instead hooks/callbacks are provided to fetch the data.
The implementation is in Java 7, but the tests are in Groovy and Spock.
The query parsing is done with ANTLR. The grammar is here.
I would appreciate any feedback via Twitter @andimarek or Pull request/Issue.