Netflix / Netflix/dgs-codegen

Make `GenerateJavaTask.schemaPaths` lazy instead of `@Input List<Any>`

Open
#952 1 comment 0 reactions 1 assignee View on GitHub

@jiholee17 is already working on this.

Since Sep 14, 2026.

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

Description

The schemaPaths input property of the GenerateJavaTask currently doesn't accept a Provider or a FileCollection.
If you resolve the graphql schema from an external dependency, that means you have to resolve that configuration at configuration time.
It is also a set of path string annotated with @Input rather than a set of files annotated with @InputFiles or @Classpath, so Gradle cannot determine whether files are up-to-date for task avoidance.
The plugin already does this correctly for the dgsCodegenClasspath ConfigurableFileCollection input in the same class annotated with @Classpath, making this inconsistent.

Can this be adjusted, so we can

  • avoid configuration-time dependency resolution
  • benefit from content-based up-to-date checking
  • have type-safe input checking: a Set<File> accidentally passed as a single list element converted to the String literal [/path/to/schema.graphqls], brackets included, and the first sign of the mistake was a compilation failure in a downstream consumer.

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.