| Optimistic responses are in fact saved in the cache and we additionally performing an update for query. However cache saves them using some special method to differentiate between regular data and optimistic response. I think that they omit optimistic responses by design when doing subsequent query as Optimistic Response is designed to be short lived and be part of the current query. This is not our bug really but Apollo one. Apollo cache need to have ability to make Optimistic Response persistent across the queries. While update thing can resolve problem it's just an hack so we could resort it as the last chance. I believe that we should first research why Optimistic Responses disappear and investigate if we could change cache to not remove them after next query - this could be an single flag or one line of code so it's worth to try to tackle this problem by seeing why this is happening. I also believe that we should fix it but we should look to leverage as much as possible from Apollo. Logging Apollo issue is good idea, but we first need to know what is actual problem and if it's just problem with our aproach or their library. |