Skip to content

This repository contains spring-boot + graphql-java example

Notifications You must be signed in to change notification settings

daggerok/boot-graphql

Repository files navigation

GraphQL | Spring Boot Build Status

This repository contains spring-boot + graphql-java example using awesome kotlin language

graphql

query people endpoint
echo '{"query":"{ people { id name } }"}' | http post :8080
HTTP/1.1 200
# skip headers...
{
    "data": {
        "people": [
            {
                "id": 1,
                "name": "Max"
            },
            {
                "id": 2,
                "name": "Bax"
            },
            {
                "id": 3,
                "name": "Fax"
            }
        ]
    }
}
query person by it’s id
echo '{"query":"{ person(id: \"1\") { name addressId } }"}' | http post :8080
HTTP/1.1 200
# skip headers
{
    "data": {
        "person": {
            "addressId": 1,
            "name": "Max"
        }
    }
}

maven

build and run using maven wrapper
mvn -N io.takari:maven:wrapper
bash mvnw package spring-boot:run
# or bash mvnw package -DskipTests; java -jar target/*.jar

gradle

build and run using gradle wrapper
gradle wrapper
bash gradlew build bRun
# or bash gradlew as; bash build/libs/*.jar

About

This repository contains spring-boot + graphql-java example

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published