(Kotlin) Readonly list is generated for GraphQL List type
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 217
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
- Environment : com.netflix.dgs.codegen version 5.1.10
- Language : Kotlin
- Issue : for graphql list type, Kotlin List is generated. Therefore, mutation to the list is not allowed. I need some options to enable mutable list.
For the following type
type Customer {
id : ID!
name : String!
phone : String
orders : [Order!]!
}
generated Source is
public data class Customer(
@JsonProperty("id")
public val id: String,
@JsonProperty("name")
public val name: String,
@JsonProperty("phone")
public val phone: String? = null,
@JsonProperty("orders")
public val orders: List
) {
public companion object
}
For variable orders, data type is List instead of MutableList.
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
No source file, test, or entry point is named. Start by tracing how the GraphQL orders field becomes Kotlin List in the generated Customer data class; done should include a documented option for generating a mutable list type and a way to verify the generated result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, kotlin
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100