Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

GraphQL Kotlin

opensource.expediagroup.com

  • Free plan
  • API
  • Self-hosted

What GraphQL Kotlin is

GraphQL Kotlin is a free, Apache-licensed collection of Kotlin libraries built on graphql-java for running GraphQL clients and servers. Its schema generator derives schemas from Kotlin code and can expose them through a server library, while a federation module produces Apollo Federation compliant schemas. Gradle and Maven plugins generate type-safe client code from an existing schema. Generated clients handle queries, mutations, batching, coroutines, custom scalars, and configurable enum defaults, with Jackson and kotlinx.serialization model formats. Reference HTTP clients use Ktor HTTP Client and Spring WebClient, and other engines can be used. Server implementations target Spring Boot and Ktor; the Spring option uses Spring WebFlux. Ktor supports Kotlin Flow subscriptions over WebSockets with graphql-transport-ws. Routes require explicit configuration, and schema generation supports Lists but not Sets, arbitrary Maps, or arrays by default.

Who it suits

It suits Kotlin teams building GraphQL servers or generating type-safe clients. It is available for API and self-hosted deployments.

Good to know, and what to watch

  • Generates schemas from Kotlin code
  • Type-safe clients via Gradle and Maven
  • Supports Spring Boot and Ktor servers
  • Includes WebSocket subscriptions in Ktor
  • Apache License 2.0 and free plan
  • Ktor routes require explicit configuration
  • Sets, Maps, and arrays lack default schema support
  • No free trial

Open source

Free

Free plan

The verdict

GraphQL Kotlin combines Kotlin server integrations with generated, type-safe clients and flexible serialization. Check its collection-type limits and route setup requirements before adopting it.

What the maker publishes

Client features
Clients support query and mutation operations, batching, coroutines, custom scalars, and configurable enum defaults. source
Client generation
Gradle and Maven plugins generate type-safe Kotlin client code from an existing GraphQL schema. source
Client integrations
Reference HTTP client implementations use Ktor HTTP client and Spring WebClient, and custom implementations can use other engines. source
Collection limit
The schema generator explicitly supports Kotlin Lists; Sets, arbitrary Maps, and arrays are not supported out of the box. source
Configuration limit
The Ktor plugin does not automatically configure routes; routes must be explicitly configured with the Routing plugin. source
Federation
The federation module can generate Apollo Federation compliant schemas. source
Integrations
Reference client implementations use Ktor HTTP Client and Spring WebClient, and custom implementations can use other engines. source
Intended users
The project describes its common use cases as running a GraphQL server and generating a type-safe client in Kotlin. source
License
The library is licensed under Apache License 2.0. source
Purpose
GraphQL Kotlin is a collection of libraries built on graphql-java to run GraphQL clients and servers in Kotlin. source
Schema generation
Its schema generator creates a GraphQL schema from Kotlin code and can expose it through a server library. source
Security
The repository README directs users to SECURITY.md for security issue contact information and supported versions receiving security updates. source
Security policy
The repository directs users to its security policy for reporting issues and information about versions receiving security updates. source
Serialization
Generated client models support Jackson and kotlinx.serialization formats. source
Server configuration
The Ktor plugin does not configure routes automatically, allowing applications to selectively enable routes and wrap them with logic such as authentication. source
Server frameworks
The documentation describes server examples and integrations for Spring Boot and Ktor. source
Server integrations
The project provides Spring Boot and Ktor server implementations; the Spring server uses Spring WebFlux. source
Subscriptions
The Ktor server supports Kotlin Flow subscriptions over WebSockets using the graphql-transport-ws subprotocol. source
Support
The maintainers invite questions through GitHub Discussions and the public #graphql-kotlin channel on Kotlin Slack. source
What it does
GraphQL Kotlin is a collection of libraries built on graphql-java for running GraphQL clients and servers in Kotlin. source

Checked against the maker's pages on 4 Oct 2026.