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
Create a mutation with an external parameter with the name name. This will conflict with the parameter by the name of name.
The solution would be to change the name of the function name() to something less common, like operationName(), or mutationName(), etc. Another alternative would be to set the JsName annotation on the base class: @JsName("mutationName"). This will allow the same Kotlin api, but when compiled to JS, would actually use a different function for JS.
Logs
JavaScript name (name) generated for this declaration clashes with another declaration: val name: String
The text was updated successfully, but these errors were encountered:
Awesome! Thanks for the fast turn around - I wonder if it makes sense to do the same thing with document() while you are in there, although document is probably less common.
Thank you! That's a good point! I've thought about it but figured we should really name them with a reserved name, like __operation to avoid any clashes - but didn't want to break the symmetry with id, nor change its js name (not sure if that would be a breaking change). On the other hand, since there is an easy workaround, I didn't worry too much about it 😅 Maybe we can rename these fields in v4 (breaking changes allowed).
Version
3.7.1
Summary
Steps to reproduce the behavior
Create a mutation with an external parameter with the name
name
. This will conflict with the parameter by the name ofname
.The solution would be to change the name of the function
name()
to something less common, likeoperationName()
, ormutationName()
, etc. Another alternative would be to set the JsName annotation on the base class:@JsName("mutationName")
. This will allow the same Kotlin api, but when compiled to JS, would actually use a different function for JS.Logs
The text was updated successfully, but these errors were encountered: