Unsubscribe/dispose doesn’t work with applyLiveQueryJSONDiffPatchGenerator
ianberdin opened this issue · 3 comments
ianberdin commented
Only today I noticed that when using applyLiveQueryJSONDiffPatchGenerator, unsubscribing (dispose) to queries does not work. I.e. if you Invalidate(...), it will still send a patch to the client. However, everything works if you remove applyLiveQueryJSONDiffPatchGenerator.
const execute = flow(
liveQueryStore.makeExecute(defaultExecute),
applyLiveQueryJSONPatchGenerator
);
const result = applyLiveQueryJSONDiffPatchGenerator(
execute(...)
);
An example: the last message is a patch After unsubscribe.
Node: v16.13.1
Chrome: v96
graphql-ws: 5.5.5
@urql/core: 2.3.6
@n1ru4l/graphql-live-query: 0.9.0
@n1ru4l/graphql-live-query-patch-jsondiffpatch: 0.7.0
@n1ru4l/in-memory-live-query-store: 0.8.0
n1ru4l commented
I will get to this soon, the AsyncIterable cleanup is not properly proxied
n1ru4l commented
@ianberdin COuld you please confirm whether this is resolved with the following versions: #850 (comment)