Stylianos Gakis
02/23/2022, 9:59 AMtype SomeType {
name: String
}
And it’s crashing since JS doesn’t like it with error: JavaScript name (name) generated for this declaration clashes with another declaration: fun name(): String
.
Is there some way to automatically map those names to something else, maybe like “name_” or something smarter I must think about without annoying literally everyone about this limitation 😂 just like how we can map GraphQL types to Kotlin types?mbonnin
02/23/2022, 10:05 AMStylianos Gakis
02/23/2022, 10:06 AMbod
02/23/2022, 10:06 AMmbonnin
02/23/2022, 10:08 AMbod
02/23/2022, 10:09 AMStylianos Gakis
02/23/2022, 10:12 AMname
variable for all JS classes as far as I understand, it’s not a keyword in that case.
But in any way, it doesn’t seem like you need to occupy your minds with this as it only was a problem for the variable names in the query itself, like here:
query SomeQuery($name: String!) {
query(name: $name) {
// stuff
}
}
Changing it to
query SomeQuery($moreSpecificWord: String!) {
query(name: $moreSpecificWord) {
// stuff
}
}
Compiles just fine as I can see it rn