graphql-kotlin-spring-server

An application that simulate the Swedish Transport Agency, implemented with Spring Boot, Kotlin and GraphQL

Running the server

./gradlew bootRun

Client

http://localhost:8080/playground

Example queries and mutations

All cars:

query QueryAllCars {
  cars {
    id
    brand
    model
    owners {
      name
    }
  }
}

Generate license plate:

query GenerateLicensePlate {
  generateLicensePlate {
    value
  }
}

Add a new car:

mutation AddCar {
  addCar(carInput: {
    brand: "Opel"
    model: "Ascona"
  }
 ) {
    id
    brand
    model
  }
}

GitHub

View Github