KotlinCodegenOpt
Properties
Whether to add default arguments for input objects.
Whether to generate kotlin constructors with @JvmOverloads
for more graceful Java interop experience when default values are present. Note: when enabled in a multi-platform setup, the generated code can only be used in the common or JVM sourcesets.
Whether to add the unknown value for enums. Unknown is used for clients when a new enum is added on the server but is not always useful on servers
Whether to generate Kotlin models with internal
visibility modifier.
Kotlin native generates Any? for optional types Setting generateFilterNotNull generates extra filterNotNull
functions that help keep the type information.
Whether to generate builders in addition to constructors for operations and input types. Constructors are more concise but require passing an instance of Optional
always, making them more verbose for the cases where there are a lot of optional input parameters.
Whether to add the JsExport annotation to generated models. This is useful to be able to cast JSON parsed responses into Kotlin classes using unsafeCast.
The annotation to use for @requiresOptIn
fields/inputFields/enumValues
A list of Regex patterns for GraphQL enums that should be generated as Kotlin sealed classes instead of the default Kotlin enums.