Skip to main content
Version: 3.x.x

Getting Started

GraphQL Kotlin is a collection of libraries, built on top of graphql-java, that aim to simplify running GraphQL in Kotlin

Modules

If you encounter any problems using this library please open up a new Issue

Additional resources

Installation

Using a JVM dependency manager, link any graphql-kotlin-* library to your project. You can see the latest version and other examples in Sonatype Central Repository

Maven


<dependency>
<groupId>com.expediagroup</groupId>
<artifactId>graphql-kotlin-spring-server</artifactId>
<version>${latestVersion}</version>
</dependency>

Gradle


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.

Apollo Federation

Using graphql-kotlin-federation, you can generate an Apollo Federation compliant schema.

See the docs in Apollo Federation.

Running a Server

graphql-kotlin-spring-server is a combination of the schema generator, fedeation, and server libraries. If you are looking to run a GraphQL server, this is the place to start.

See the docs in Spring Server Overview.

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

The examples module is a collection of working code and examples on how to use all of the graphql-kotlin modules.

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.