This module defines an interface for a lightweight, typesafe GraphQL HTTP clients. See graphql-kotlin-ktor-client and graphql-kotlin-spring-client for reference implementations.
NOTE: GraphQL clients can be invoked directly by manually creating your corresponding data model but since at its core it ends up with simple POST request this mode of operation is not that useful. Instead, GraphQL Kotlin clients should be used together with one of the GraphQL Kotlin build plugins to auto-generate type safe data models based on the specified queries.
- Supports query and mutation operations
- Supports batch operations
- Automatic generation of type-safe Kotlin models supporting
kotlinx.serialization
andJackson
formats - Custom scalar support - defaults to String but can be configured to deserialize to specific types
- Supports default enum values to gracefully handle new/unknown server values
- Native support for coroutines
- Easily configurable Ktor and Spring WebClient based HTTP Clients
- Documentation generated from the underlying GraphQL schema
Additional information can be found in our documentation and the Javadocs of all published library versions.
If you have a question about something you can not find in our documentation or javadocs, feel free to start a new discussion.