GraphQL Kotlin Spring Example

One way to run a GraphQL server is with Spring Boot. This example app uses Spring Webflux together with graphql-kotlin and graphql-playground.

Running locally

First you must build all the other modules since this is a multi-module project.

From the root directory:

mvn clean install

Then to start the server:

  • Run Application.kt directly from your IDE
  • Alternatively you can also use the spring boot maven plugin by running mvn spring-boot:run from the command line in the spring example directory.

Once the app has started you can explore the example schema by opening the GraphQL Playground endpoint at http://localhost:8080/playground.