Skip to main content
Version: 5.x.x

Getting Started

GraphQL Kotlin is a collection of libraries, built on top of graphql-java, that simplify running GraphQL clients and servers in Kotlin.

Installation

Using a JVM dependency manager, link any graphql-kotlin-* library to your project.

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-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

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.

Additional resources