You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeSomei8n {
aa: String,
ab: String,
ae: String,
# and so on...as: String,
}
The generator generates a .kt file:
data classSomei8n (
valaa:String? = null,
valab:String? = null,
//and so on...valas: String? = null, //compilation error due to the reserved keyword as not being wrapped in backticks
)
Types with fields matching to reserved keywords should be wrapped with backticks:
data classSomei8n (
val `as`: String? = null, //works and retains field name
)
Applies at least to is and as keywords. Exhaustive list of Kotlin keywords can be found at: kotlin docs
The text was updated successfully, but these errors were encountered:
Say we have a graphql schema as follows:
The generator generates a
.kt
file:Types with fields matching to reserved keywords should be wrapped with backticks:
Applies at least to
is
andas
keywords. Exhaustive list of Kotlin keywords can be found at: kotlin docsThe text was updated successfully, but these errors were encountered: