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
If we missing adapter but we have mapping configuration in apollo plugin:
customTypeMapping {
DateTime = "java.util.Date"
}
compiler generates models with the java.util.Date rather then String. But when we reading response field value of DateTime we are reading it as a String and then we will fail as we can't just assign String to java.util.Date and we don't have the way to convert it.
So the only solution is next: if we missing mapping in apollo plugin (build.gradle), string will be used by default as type in generated models for custom scalar types
If there's no adapter, I don't expect anyone to put customTypeMapping in build.gradle. So this would really be a 'zero configuration' thing to make it easier to start using the project.
Agree with using a default return type if no mapping is defined. Maybe use 'Object' instead of 'String' so we could return directly what's in the json ?
Would be nice if
DateTime
for an example could by default be readable as a string for users that did not register any custom adapters.The text was updated successfully, but these errors were encountered: