https://github.com/graphql-java/graphql-java-http-example
An example of graphql-java in a HTTP application
https://github.com/graphql-java/graphql-java-http-example
Last synced: about 2 months ago
JSON representation
An example of graphql-java in a HTTP application
- Host: GitHub
- URL: https://github.com/graphql-java/graphql-java-http-example
- Owner: graphql-java
- License: mit
- Created: 2017-10-12T07:34:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T04:35:14.000Z (about 5 years ago)
- Last Synced: 2025-04-19T17:14:28.761Z (2 months ago)
- Language: Java
- Size: 62.5 KB
- Stars: 27
- Watchers: 3
- Forks: 23
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# graphql-java-http-example
An example of using graphql-java in a HTTP application.
It demonstrates the use of `graphql IDL` to define a schema in a textual way.
It also shows how to use `data loader` to ensure that most efficient way to load
inside a graphql queryFinally it shows how to combine graphql-java `Instrumentation` to create performance tracing
and data loader effectiveness statistics.To build the code type
./gradlew build
To run the code type
./gradlew run
Point your browser athttp://localhost:3000/
Some example graphql queries might be
{
hero {
name
friends {
name
friends {
id
name
}
}
}
}or maybe
{
luke: human(id: "1000") {
...HumanFragment
}
leia: human(id: "1003") {
...HumanFragment
}
}
fragment HumanFragment on Human {
name
homePlanet
friends {
name
__typename
}
}