-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some type mappings in <customTypeMap /> is ignored #40
Comments
Hi @ckwong-jebsen val longCustomTypeAdapter = object : CustomTypeAdapter<Long> {
override fun encode(value: Long): CustomTypeValue<*> {
return value.toString() as CustomTypeValue<String>
}
override fun decode(value: CustomTypeValue<*>): Long {
return (value.value as BigDecimal).toLong()
}
} |
I also encountered the same problem. When it is generating CustomType.java file, it doesn't include the Here's a snippet of my schema.json file
I also tried your suggestion in providing a CustomTypeAdapter but still didn't include the GeoJSONString CustomTypeMap in CustomType.java file upon generation.
Please advise if I did something wrong on my end or recommend how should I be able to fix it. By the way, appreciate what you did with this plugin, it's a huge lifesaver for one of the projects that I'm involved in. |
Hi @dryst0, ApolloClient.builder()
.serverUrl(serverUrl)
.addCustomTypeAdapter(CustomType.DATE, dateCustomTypeAdapter)
.build() |
Yes, I have also added the custom type adapters to my apolloClient
Only
|
I'll try to add a test for this case in next release. I think that you have to report this issue to the main project which is Apollo Android It could be an issue with Apollo compiler thanks |
Alright. I'll also raise an issue there as well. Do you have any suggestions to work around this issue in the meanwhile? I am thinking of copying the generated-sources back to main directory and manually adding the Thank you also for the quick response. |
Just wanted to refer the post-mortem report regarding the issue I've raised here. apollographql/apollo-kotlin#2721 (comment)TLDR; Multiple execution section under the same plugin which writes the output on the same directory and overwrites the CustomType.java Also, thanks for all the help! |
Some of the custom mapping is ignored, for examples, mapping of "Int" is ignored.
Below is my mappings
Could you please kindly help?
The text was updated successfully, but these errors were encountered: