4.0.0 Pagination scenario: CacheAndNetwork
emits the incoming data as-is, rather than the merged result from the cache
#5818
Labels
Question
When collecting the flow returned by
toFlow
constructed with theCacheAndNetwork
fetch policy, the second emitted data consists of the incoming data as-is, rather than the merged result from the cache.I'm currently in the process of implementing relay-style-pagination in version 4.0.0-beta.5, utilizing ConnectionRecordMerger. I've confirmed that the existing and incoming data merge correctly in the cache. However,
toFlow
emits the merged data from the cache, while the incoming data is emitted as-is. Consequently, the size of the array in the collected data appears as follows: 5, 10, 5, 15, 5, 20, 5, 25, 5, 30, 5, 35, ...Is it intentional for
CacheAndNetwork
fetch policy to emit incoming data? This behavior appears to differ from that ofapollo-react
.The text was updated successfully, but these errors were encountered: