GraphQL Kotlin
opensource.expediagroup.com
What it is
GraphQL Kotlin is a free Apache License 2.0 collection of libraries, built on graphql-java, for running GraphQL clients and servers in Kotlin. Its schema generator creates schemas from Kotlin code, and a federation module can produce Apollo Federation-compliant schemas. Gradle and Maven plugins generate type-safe Kotlin clients from existing schemas. Generated clients support queries, mutations, batching, coroutines, custom scalars, configurable enum defaults, and Jackson or kotlinx.serialization models. Reference HTTP integrations use Ktor HTTP Client and Spring WebClient, while custom engines are possible. Server implementations target Spring Boot and Ktor; the Spring server uses Spring WebFlux. Ktor supports Kotlin Flow subscriptions over WebSockets with the graphql-transport-ws subprotocol. Its plugin leaves route configuration to the application, allowing selective routes and added authentication logic. The schema generator supports Kotlin Lists, but Sets, arbitrary Maps, and arrays are not supported out of the box. The project is self-hosted, with security guidance in its repository and community support through GitHub Discussions and Kotlin Slack.
Spec sheet
- What it does
- GraphQL Kotlin is a collection of libraries built on graphql-java for running GraphQL clients and servers in Kotlin.Read 4 Oct 2026 · opensource.expediagroup.com
- Purpose
- GraphQL Kotlin is a collection of libraries built on graphql-java to run GraphQL clients and servers in Kotlin.Read 4 Oct 2026 · opensource.expediagroup.com
- Intended users
- The project describes its common use cases as running a GraphQL server and generating a type-safe client in Kotlin.Read 4 Oct 2026 · github.com
- Integrations
- Reference client implementations use Ktor HTTP Client and Spring WebClient, and custom implementations can use other engines.Read 4 Oct 2026 · opensource.expediagroup.com
- Security
- The repository README directs users to SECURITY.md for security issue contact information and supported versions receiving security updates.Read 4 Oct 2026 · github.com
- Support
- The maintainers invite questions through GitHub Discussions and the public #graphql-kotlin channel on Kotlin Slack.Read 4 Oct 2026 · github.com
- License
- The library is licensed under Apache License 2.0.Read 4 Oct 2026 · github.com
- Client features
- Clients support query and mutation operations, batching, coroutines, custom scalars, and configurable enum defaults.Read 4 Oct 2026 · opensource.expediagroup.com
- Client generation
- Gradle and Maven plugins generate type-safe Kotlin client code from an existing GraphQL schema.Read 4 Oct 2026 · opensource.expediagroup.com
- Client integrations
- Reference HTTP client implementations use Ktor HTTP client and Spring WebClient, and custom implementations can use other engines.Read 4 Oct 2026 · opensource.expediagroup.com
- Collection limit
- The schema generator explicitly supports Kotlin Lists; Sets, arbitrary Maps, and arrays are not supported out of the box.Read 4 Oct 2026 · opensource.expediagroup.com
- Configuration limit
- The Ktor plugin does not automatically configure routes; routes must be explicitly configured with the Routing plugin.Read 4 Oct 2026 · opensource.expediagroup.com
- Federation
- The federation module can generate Apollo Federation compliant schemas.Read 4 Oct 2026 · opensource.expediagroup.com
- Schema generation
- Its schema generator creates a GraphQL schema from Kotlin code and can expose it through a server library.Read 4 Oct 2026 · opensource.expediagroup.com
- Security policy
- The repository directs users to its security policy for reporting issues and information about versions receiving security updates.Read 4 Oct 2026 · github.com
- Serialization
- Generated client models support Jackson and kotlinx.serialization formats.Read 4 Oct 2026 · opensource.expediagroup.com
- Server configuration
- The Ktor plugin does not configure routes automatically, allowing applications to selectively enable routes and wrap them with logic such as authentication.Read 4 Oct 2026 · opensource.expediagroup.com
- Server frameworks
- The documentation describes server examples and integrations for Spring Boot and Ktor.Read 4 Oct 2026 · opensource.expediagroup.com
- Server integrations
- The project provides Spring Boot and Ktor server implementations; the Spring server uses Spring WebFlux.Read 4 Oct 2026 · opensource.expediagroup.com
- Subscriptions
- The Ktor server supports Kotlin Flow subscriptions over WebSockets using the graphql-transport-ws subprotocol.Read 4 Oct 2026 · opensource.expediagroup.com
Plans and prices
Strong points and limits
Strong points
- Type-safe Kotlin client generation
- Schema generation from Kotlin code
- Spring Boot and Ktor servers
- WebSocket subscription support
- Apache License 2.0
Limits
- Ktor routes require explicit configuration
- Sets, Maps, and arrays lack built-in support
- Self-hosted deployment
Who it suits
It suits Kotlin developers building GraphQL servers or generating type-safe clients with Gradle or Maven.
Verdict
GraphQL Kotlin offers client generation, schema tooling, federation, and Kotlin server integrations in an open-source package. Teams should account for manual Ktor routing and collection-type limits.
Where Specifiction places it
- GraphQL Tools#8 of 328.0