- Java JDK 21 is installed
JAVA_HOMEenvironment variable is set correctly orjavais in the classpath
Check out the Getting Started docs.
./gradlew runThe server will start on http://localhost:8080.
With the server running, you can use the following curl command to send GraphQL queries:
curl 'http://localhost:8080/graphql' -H 'content-type: application/json' --data-raw '{"query":"{ greeting }"}'You should see the following output:
{"data":{"greeting":"Hello, World!"}}With the server running, navigate to the following URL in your browser to bring up the GraphiQL interface:
http://localhost:8080/graphiql?path=/graphql
Then, run the following query:
query HelloWorld {
greeting
author
}You should see this response:
{
"data": {
"greeting": "Hello, World!",
"author": "Brian Kernighan"
}
}