Eduard Boloș
12/28/2021, 1:42 AMcodegenModels
set to compat
, or with `useVersion2Compat()`(which I think that it might do the same thing), there would be thousands of changes to go through in the project, the vast majority of them would be just removing function invocations from GQL fields, quite a few of them would be changing how polymorphic fragments are accessed, and a lot of mutation and query builders need to be changed too to constructor invocations. It would be a huuuuge time sink to do all of this changes in one go, so I was wondering, is it possible to have v2 and v3 running side by side in the same app, but using the same SQL cache? So that we can keep the old code using Apollo-Android, and slowly migrate to Apollo-Kotlin. (This would actually solve another issue for us, we have a lot of custom code that allows us to pass references to fragments from one activity to another and then observe for updates, and we would have to rewrite most of it, but again, it's hard to do it in one go. Thankfully, ApolloStore.readFragment()
from v3 does a lot of this already 😄.)
I imagine that even if it would be possible to have two instances writing to and reading from the same database, observing the cache for updates using .watch()
won't trigger any updates if the write was done by the other instance, isn't it?
Is there any hope to ease the migration for such a complex project? I want the new and fancy test builders, haha. (Sorry for the wall of text.)mbonnin
12/28/2021, 5:50 AMwatch
would come with challenges toocompat
models are compatible with Kotlin codegen (with a few exceptions) but have a lot more differences with Java modelsgenerateKotlinModels.set(true)
).Eduard Boloș
12/28/2021, 11:08 AM