Removing input type from schema does not remove generated type
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 217
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
My Netflix DGS project is using com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-shared-core=5.4.0
On my local machine, I was developing a new schema with a new input type. Netflix DGS generated the input type, I wrote code against it, everything was good.
Then, I decided to rename the input type to something else. I regenerated the schema using the generateJava task, everything was good. But I forgot to go into my application code and use the new input type name. Everything compiled so I thought it was good, so I pushed up to CI. It failed on the CI server because the old type name didn't exist anymore.
I would expect Netflix DGS to regenerate a clean set of classes each time by wiping out ALL of the existing generated code and generating all new files every time. Or at the very least, detecting code files that don't belong anymore and deleting them.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generateJava task and the graphql-dgs-codegen-shared-core code path that writes generated Java classes. Trace how regeneration handles files from a previous schema version; done means a renamed or removed input type no longer leaves its old generated class behind after regeneration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100