Observable doesn't fire when notifyOnNetworkStatusChange
is true and data is reloaded but doesn't change
#12069
Labels
notifyOnNetworkStatusChange
is true and data is reloaded but doesn't change
#12069
Issue Description
Hi. I believe I found a bug in
ObservaleQuery.subscribe
. I'm attaching a CodeSandbox repro, but it's essentially this code:Essentially we receive a "loading" event with no data, and then nothing afterwards. This means that the consumer of this observable is stuck in a loading state.
This works correctly if the if the data actually changes after a reload, which means that it's likely because of an optimization that prevents calling
next
when nothing changed. I think the logic ofisDifferentFromLastResult
needs to be modified.When
notifyOnNetworkStatusChange
is false no event is fired, but that seems correct.Link to Reproduction
https://codesandbox.io/p/devbox/tender-framework-68wm4d?workspaceId=7e27fe59-1d44-40f8-b1d0-beb23c6580e8
Reproduction Steps
No response
@apollo/client
version3.11.8
The text was updated successfully, but these errors were encountered: