dotansimha / dotansimha/graphql-code-generator-community
Kotlin plugin does not create __typename property in data class
- Dominant language
- TypeScript
- Stars
- 137
- Forks
- 195
- Avg merge
- 6h 20m
- Merged PRs (30d)
- 16
Description
**Describe the bug**
Kotlin types are not generated with a `__typename` property which breaks resolving union types.
**To Reproduce**
Steps to reproduce the behavior:
* Generate types using Kotlin plugin
* I tried adding `nonOptionalTypename: true` but that had no effect
https://codesandbox.io/s/quizzical-star-wkmfk?file=/codegen.yml
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Kotlin plugin generation described in codegen.yml, using the linked CodeSandbox as the example. Check the generated Kotlin data classes and the effect of nonOptionalTypename: true. Done means generated types include a __typename property and union types resolve correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, kotlin
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100