dotansimha / dotansimha/graphql-code-generator-community

Kotlin plugin does not create __typename property in data class

Open
#131 0 comments 1 reaction 0 assignees View on GitHub
help wanted
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.