Since now I finished migrating to Apollo 3 and sta...
# apollo-kotlin
e
Since now I finished migrating to Apollo 3 and started using data builders, I am running often into this issue where I forget specifying my custom FakeResolver, and the tests fail because the default FakeResolver doesn't know how to instantiate our custom scalars. Have you considered adding a mechanism that would allow specifying a global custom FakeResolver, so we don't have to pass the same custom one over and over again for each builder? šŸ˜„
m
Interesting question!
The more I think about this, the more I think there's something to be done around codegen for customscalars
For an example, having to pass
CustomScalarAdapters
during
ApolloClient
is a bit cumbersome
not to mention passing it around in
ApolloStore
(see this issue)
We could theorically make everything at compile time I guess, just change the entry point (
ApolloClient
would become abstract and we'd codegen
MyServiceApolloClient
preconfigured with the "good" custom scalars)
But short term I guess we could just make another codegen compiler option to replace
DefaultFakeResolver
with another symbol
In all cases, do you mind opening an issue so that we can keep track of this?
e
Sure thing, will do tomorrow! Thanks! šŸ™‚