dgs-framework icon indicating copy to clipboard operation
dgs-framework copied to clipboard

feature: Kotlin specific generated request/response classes

Open mbossenbroek opened this issue 3 years ago • 1 comments

Describe the Feature Request

Generated projection and response classes that lean into Kotlin idioms like explicit nullability and leveraging lambda expressions to build a DSL.

Note: this isn't so much a request as a placeholder to track migrating some existing work into this repo.

Describe Preferred Solution

A client might express a query like this (written in kotlin):

    client.query {
        foo(a = 1, b = "2") {
            field1
            field2 {
                other
                stuff
            }
        }
    }

For response objects, differentiate between "I asked for this and it's null" and "I did not ask for this, but I tried to use it"

Describe Alternatives

Using the existing java classes :)

mbossenbroek avatar Feb 09 '22 23:02 mbossenbroek

This is being worked on by folks at Netflix, and is expected to be contributed soon.

paulbakker avatar Feb 10 '22 00:02 paulbakker

Closing as this has become available since the last activity on this issue: https://netflix.github.io/dgs/advanced/kotlin-codegen/

Emily avatar Dec 07 '23 21:12 Emily