GraphQL Kotlin

What GraphQL Kotlin is
GraphQL Kotlin is a free collection of libraries built on graphql-java for running GraphQL clients and servers in Kotlin. Its schema generator creates GraphQL schemas from Kotlin code, and a federation module can produce Apollo Federation compliant schemas. Gradle and Maven plugins generate type-safe Kotlin client code from an existing schema. Generated clients support queries and mutations, batching, coroutines, custom scalars, and configurable enum defaults; generated models support Jackson and kotlinx.serialization. Reference HTTP client implementations use Ktor HTTP Client and Spring WebClient, while custom implementations can use other engines. Server implementations are available for Spring Boot and Ktor, with the Spring server using Spring WebFlux. The Ktor server supports Kotlin Flow subscriptions over WebSockets using graphql-transport-ws. Its plugin leaves route setup to the application, which must configure routes explicitly. The schema generator supports Kotlin Lists, but Sets, arbitrary Maps, and arrays are not supported out of the box. The project uses the Apache License 2.0 and is self-hosted.
Who it suits
It suits Kotlin developers who need to run a GraphQL server or generate a type-safe client. Teams can use its Spring Boot and Ktor server implementations or its Gradle and Maven client-generation plugins.
What it does well
- Generates schemas from Kotlin code.
- Gradle and Maven plugins generate type-safe clients.
- Clients support batching and coroutines.
- Provides Spring Boot and Ktor server implementations.
What to know first
- Ktor routes require explicit configuration.
- Sets, arbitrary Maps, and arrays lack built-in schema support.
- No free trial is listed.
Limits
The free Open source plan costs nothing. The schema generator supports Kotlin Lists, but Sets, arbitrary Maps, and arrays are not supported out of the box; the Ktor plugin also requires explicit route configuration.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Open source | Apache License 2.0 | Free |
As opensource.expediagroup.com lists them, read 4 Oct 2026. The maker's own page has the final word.
Getting started
- Open the GraphQL Kotlin project website.
- Choose the client or server libraries for your Kotlin application.
- For client generation, use the Gradle or Maven plugin with an existing GraphQL schema.
- For a server, use the Spring Boot or Ktor implementation and configure the routes explicitly.
Verdict
GraphQL Kotlin provides client and server libraries for Kotlin, with integrations for Spring Boot and Ktor. Consider the explicit Ktor route setup and schema type limitations when choosing it.
Questions
How much does GraphQL Kotlin cost?
The Open source plan is free. The pricing model is free, and a free plan is available.
Is GraphQL Kotlin open source?
Yes. It is licensed under Apache License 2.0.
What platforms does it support?
Its listed platforms are API and self-hosted.
Which server frameworks does it integrate with?
It provides Spring Boot and Ktor server implementations. The Spring server uses Spring WebFlux.
Which collection types can its schema generator handle?
It explicitly supports Kotlin Lists. Sets, arbitrary Maps, and arrays are not supported out of the box.
Facts from GraphQL Kotlin's own pages
- Client features
- Clients support query and mutation operations, batching, coroutines, custom scalars, and configurable enum defaults. · opensource.expediagroup.com, 4 Oct 2026
- Client generation
- Gradle and Maven plugins generate type-safe Kotlin client code from an existing GraphQL schema. · opensource.expediagroup.com, 4 Oct 2026
- Client integrations
- Reference HTTP client implementations use Ktor HTTP client and Spring WebClient, and custom implementations can use other engines. · opensource.expediagroup.com, 4 Oct 2026
- Collection limit
- The schema generator explicitly supports Kotlin Lists; Sets, arbitrary Maps, and arrays are not supported out of the box. · opensource.expediagroup.com, 4 Oct 2026
- Configuration limit
- The Ktor plugin does not automatically configure routes; routes must be explicitly configured with the Routing plugin. · opensource.expediagroup.com, 4 Oct 2026
- Federation
- The federation module can generate Apollo Federation compliant schemas. · opensource.expediagroup.com, 4 Oct 2026
- Integrations
- Reference client implementations use Ktor HTTP Client and Spring WebClient, and custom implementations can use other engines. · opensource.expediagroup.com, 4 Oct 2026
- Intended users
- The project describes its common use cases as running a GraphQL server and generating a type-safe client in Kotlin. · github.com, 4 Oct 2026
- License
- The library is licensed under Apache License 2.0. · github.com, 4 Oct 2026
- Purpose
- GraphQL Kotlin is a collection of libraries built on graphql-java to run GraphQL clients and servers in Kotlin. · opensource.expediagroup.com, 4 Oct 2026
- Schema generation
- Its schema generator creates a GraphQL schema from Kotlin code and can expose it through a server library. · opensource.expediagroup.com, 4 Oct 2026
- Security
- The repository README directs users to SECURITY.md for security issue contact information and supported versions receiving security updates. · github.com, 4 Oct 2026
- Security policy
- The repository directs users to its security policy for reporting issues and information about versions receiving security updates. · github.com, 4 Oct 2026
- Serialization
- Generated client models support Jackson and kotlinx.serialization formats. · opensource.expediagroup.com, 4 Oct 2026
- Server configuration
- The Ktor plugin does not configure routes automatically, allowing applications to selectively enable routes and wrap them with logic such as authentication. · opensource.expediagroup.com, 4 Oct 2026
- Server frameworks
- The documentation describes server examples and integrations for Spring Boot and Ktor. · opensource.expediagroup.com, 4 Oct 2026
- Server integrations
- The project provides Spring Boot and Ktor server implementations; the Spring server uses Spring WebFlux. · opensource.expediagroup.com, 4 Oct 2026
- Subscriptions
- The Ktor server supports Kotlin Flow subscriptions over WebSockets using the graphql-transport-ws subprotocol. · opensource.expediagroup.com, 4 Oct 2026
- Support
- The maintainers invite questions through GitHub Discussions and the public #graphql-kotlin channel on Kotlin Slack. · github.com, 4 Oct 2026
- What it does
- GraphQL Kotlin is a collection of libraries built on graphql-java for running GraphQL clients and servers in Kotlin. · opensource.expediagroup.com, 4 Oct 2026
Where GraphQL Kotlin stands on Freedom251
- GraphQL Tools#12 of 32