Not able to generate builder classes in Kotlin
Plugin is not generating builder classes when the selected language is Kotlin, is there a way around this.
Hi, will take a look tomorrow.
Hi @saitejdandge
I did some research with version 1.22 of the plugin.
If you want to use the Builder pattern for your generated types you'll need to add the following to your plugin configuration block to trigger the DGS kotlin2 codepath:
<generateKotlinNullableClasses>true</generateKotlinNullableClasses>
Client Generation
It looks like the client types are generated as Java, except for Entities, even if you've selected Kotlin.
You can generate Kotlin client types by setting the following in your configuration block.
<generateKotlinClosureProjections>true</generateKotlinClosureProjections>.
Please keep in mind this plugin is a thin wrapper over the Netflix DGS codegen project to support the maven based community.
If you're curious this is the code that's actually generating the types: https://github.com/Netflix/dgs-codegen/blob/5c89523dd90b645746ed73ab7c873412d34624b9/graphql-dgs-codegen-core/src/main/kotlin/com/netflix/graphql/dgs/codegen/CodeGen.kt#L293