graphql-kotlin-schema-generator uses reflection to automatically map
Kotlin classes and enums to the corresponding GraphQL types.
By default, all public properties and functions with a valid GraphQL name and a supported return type will be mapped to a corresponding GraphQL field. Kotlin return types have to be either one of the supported scalars or a custom Kotlin type defined within supported packages. Nullability information is automatically inferred from the underlying Kotlin return type.
Additional built-in validations
- function types aka lambdas property types are currently not supported by the schema generator
- automatically generated data class methods (
toString) are filtered out
graphql-kotlin-schema-generator provides support for both GraphQL unions and interfaces.
Superclasses and interfaces can be excluded from the schema by marking them with
@GraphQLIgnore annotation or by providing
custom filtering logic in a custom SchemaGeneratorHook.