Hi again! I just starting moving some graphql’s to...
# apollo-kotlin
n
Hi again! I just starting moving some graphql’s to it’s own module. This module will perform the request, then return the response to the
app
module. I’m getting this error. I’d rather not have to append a !! or any special null checks to this if possible. I’m using version Apollo version
2.5.9
m
Unfortunately, I'm not sure we can do much about this. The Kotlin compiler has to guard against a newer version of the module changing the val to a var (which is a backward compatible change)
There was a thread about this recently, let me see if I can find it
n
thanks, ok. would I run into this same issue with apollo 3.0?
m
In Apollo Android 3, you can use
@nonnull
to turn the nullable field into an non nullable one (if that's a valid assumption) which can somewhat workaround this
n
thanks 🙂
m
But if your field is really nullable (i.e. null is an expected value), there's no silver bullet
n
ok
thanks a bunch
m
Sure thing!