Netflix / Netflix/dgs-codegen

Using variables with Kotlin closures

Open
#843 0 comments 0 reactions 1 assignee View on GitHub

@paulbakker is already working on this.

Since Aug 18, 2025.

Dominant language
Kotlin
Stars
217
Forks
116
PR merge metrics
No merged PRs in 30d

Description

The documentation provides an example for the usage of variables in the non-closure code.

I cannot find a way to do this when using generateKotlinClosureProjections = true, since the generated methods do not have any similar ...Reference parameters. I also cannot simply fall back to selectively using ...GraphQLQuery classes, since the generation of the Java classes seems to be mutually exclusive with Kotlin closures.

Is this feature planned and/or would you be willing to accept a PR for this feature?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.