Netflix / Netflix/dgs-codegen

[Feature] Provide possibility to configure the source set where the generated sources are attached

Open
#859 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Status Quo

The plugin has hardcoded definition of the source set where the generated sources are attached to - it is always main.

The Problem

GraphQL API owners would like to leverage DGS code generation in the test code of their projects, in order to test their APIs. With today's setup, the generated code ends up as part of the production code, while it is only intended for testing purposes.

Suggested Feature

Add possibility to configure the source set where the generated code is attached to. This will allow to provide test in the use case above.

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.

Research direction

Start with the linked CodegenPlugin.kt definition that attaches generated sources to the main source set. Trace how that source set is selected and how the Gradle plugin exposes configuration. Done means a project can configure test instead of main and generated sources are attached to the selected source set.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.