I am using v3 (3.6.2) of the kotlin apollo SDK.
I have the following custom scalars defined in my build.gradle file:
apollo {
packageName.set("com.pkg.android.api")
generateApolloMetadata.set(true)
mapScalar("JSON", "kotlin.String", "com.pkg.android.schema.ApolloJsonAdapter")
mapScalar("Datetime", "java.util.Date", "com.apollographql.apollo3.adapter.DateAdapter")
}
I am expected the DateAdapter to translate a String to a java.util.Date object. However the date objects are still remaining strings. Here is an example: "2022-10-17T10:57:52"
. I am expecting this string to be converted to a Date object, but it’s remaining a string. Is there a way to ensure that this gets parsed as a Date via the custom scalar?
Thanks!