GraphQL Kotlin is a collection of libraries, built on top of graphql-java, that aim to simplify running GraphQL in Kotlin
- examples — Example apps that use graphql-kotlin libraries to test and demonstrate usages
- graphql-kotlin-client (Javadoc) — Lightweight GraphQL Kotlin HTTP client
- graphql-kotlin-schema-generator (Javadoc) — Code only GraphQL schema generation for Kotlin
- graphql-kotlin-federation (Javadoc) — Schema generator extension to build federated GraphQL schemas
- graphql-kotlin-spring-server (Javadoc) — Spring Boot auto-configuration library to create GraphQL server
- graphql-kotlin-types (Javadoc) — Core types used by both client and server
- plugins — GraphQL Kotlin Gradle and Maven plugins
If you encounter any problems using this library please open up a new Issue
Using a JVM dependency manager, simply link any
graphql-kotlin-* library to your project. You can see the latest
version and other examples in Sonatype Central
implementation("com.expediagroup", "graphql-kotlin-spring-server", latestVersion)
Generating a Schema
You can use
graphql-kotlin-schema-generator to generate a schema from Kotlin code and expose it with any server library.
See the docs in Schema Generator Getting Started.
graphql-kotlin-federation, you can generate an Apollo Federation compliant schema.
See the docs in Apollo Federation.
Running a Server
graphql-kotlin-server is a combination of the schema generator, federation, and server libraries. If you are looking to run a GraphQL server, this is the place to start.
See the docs in GraphQL Kotlin Server.
Creating a Client
graphql-kotlin-plugins can be used to generate a
graphql-kotlin-client from an existing schema that is easy to use and type-safe.
See the docs in Client Overview.
examples module is a collection of working code and examples on how to use all of the
See the example docs for more info.
Blogs and Videos
You can find more posts and recorded conference talks on GraphQL and
graphql-kotlin on our Blogs and Videos page.