Closed ldiqual closed 3 years ago
Oof. Yeah this is related to #205, but we definitely should not be crashing here.
Quick question: Is currentUser
marked as non-nullable in your schema? If it is, your server shouldn't return the null
if there's an error - our codegen assumes that if something is marked non-nullable, it won't be null, ever, even in the event of an error.
However the more likely case is that it's not annotated at all, meaning it's nullable, and I'll have to take a closer look at what's going on here under the hood that's causing the crash.
@designatednerd Thanks for following up! currentUser
is nullable (user is not created yet). I'm happy to provide a sample project if you'd like, though it's a bit involved to set up.
A sample project would be a big help if you have the time for it!
@ldiqual I'm cleaning up old issues and wanted to check in and see if you're still having this problem or had a chance to throw together a sample project for it. Please let me know. Thank you!
Since I haven't heard back for quite some time on this, I'm going to close this out since #205 basically covers this same ground. Thank you!
Apollo crashes while trying to deserialize a failed query from cache, if the response contains a null object.
The flow goes as follows:
data.currentUser = null
NSNull
.Query
Response
Crash