Properties

Link copied to clipboard

Whether to add default arguments for input objects.

Link copied to clipboard
abstract val addJvmOverloads: Boolean?

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.

Link copied to clipboard

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

Link copied to clipboard

A list of Regex patterns for GraphQL enums that should be generated as Java classes.

Link copied to clipboard

Whether to decapitalize fields (for instance FooBar ->fooBar). This is useful if your schema has fields starting with an uppercase as it may create name clashes with models that use PascalCase

Link copied to clipboard

Whether to generate Kotlin models with internal visibility modifier.

Link copied to clipboard

Class name to use when generating the Schema class.

Link copied to clipboard

Kotlin native generates Any? for optional types Setting generateFilterNotNull generates extra filterNotNull functions that help keep the type information.

Link copied to clipboard

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.

Link copied to clipboard

Specifies which methods will be auto generated on operations, models, fragments and input objects.

Link copied to clipboard

Whether to generate builders for java models

Link copied to clipboard

Whether to generate fields as primitive types (int, double, boolean) instead of their boxed types (Integer, Double, Boolean) when possible.

Link copied to clipboard
abstract val generateSchema: Boolean?

Whether to generate the Schema class.

Link copied to clipboard

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.

Link copied to clipboard

The style to use for fields that are nullable in the Java generated code.

Link copied to clipboard

The format to output for the operation manifest. Valid values are:

Link copied to clipboard
abstract val packageName: String?

The package name for generated classes. Operations use the package name directly. Other classes like fragments and schema types use sub-packages to avoid name clashes:

Link copied to clipboard

The annotation to use for @requiresOptIn fields/inputFields/enumValues

Link copied to clipboard
abstract val rootPackageName: String?

If non-null, get the package names from the normalized file paths and prepend rootPackageName

Link copied to clipboard

A list of Regex patterns for GraphQL enums that should be generated as Kotlin sealed classes instead of the default Kotlin enums.

Link copied to clipboard

The target language to use to generate the sources

Link copied to clipboard
abstract val useSemanticNaming: Boolean?

When true, the operation class names are suffixed with their operation type like ('Query', 'Mutation' ot 'Subscription'). For an example, query getDroid { ... } GraphQL query generates the 'GetDroidQuery' class.