I encountered a weird bug that’s impossible for me to debug, seriously need some help!!!
I am reading some similar propperties from a cached Post object with these two fragments:
These two are the same thing IMO, but why is this happenning…
Can someone help me point out something I did wrong and help me understand this, I am cluless, spending two hours debugging…
Thank you!
These are the two fragments, a nested fragment structure, could this be the reason? And I don’t understand the error message, since the type def are from code gen, but normal querying and mutating are all just working fine
Yep, I think that’s probably the issue. Both are fragments on Post, and the one being nested doesn’t give a good way to differentiate the two on the same fragment. I’d set the fragmentName to “PostsSnippet” on the PostsSnippetFragment read
Holy shit…
I tested out, it is because of the nested thing!
Thank you for the help!
I think this is the same reason why my Post read returns null, it is deeply nested, but readQuery seems doesn’t have a queryName option for it, how do I get around it?
Here’s the issue: I can’t read the Post in cache.read or in cache.updateQuery: