You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enter and leave component a few times, then enter again
Trigger one update to the subscription
Expected behavior
'foo' should be logged only once
Actual behavior
Every time the component is entered another subscription is created. When triggering a single update 'foo' will be logged N times.
Suspected cause
query.ts and subscription.ts create pipes using the Wonka share operator and then call publish once to start the stream. publish is registered as a sink on the share operator that is never removed and the stream is never closed.
Removing the publish call will only start the stream when it is actually subscribed, which seems to make sense and works as advertised.
The text was updated successfully, but these errors were encountered:
Our current bindings for Svelte have a lot of problems, as we never intended for them to be extensively used already. Hence I'm grouping several issues into an umbrella issue to express an intent to reimplement the bindings for a v1.0 with all that we've learned, which supersedes this issue.
The umbrella issue where we'll plan out a new version, API, and implementation can be found here: #1007
urql version & exchanges: svelte 0.4.0
Steps to reproduce
Expected behavior
'foo' should be logged only once
Actual behavior
Every time the component is entered another subscription is created. When triggering a single update 'foo' will be logged N times.
Suspected cause
query.ts and subscription.ts create pipes using the Wonka share operator and then call
publish
once to start the stream.publish
is registered as a sink on the share operator that is never removed and the stream is never closed.Removing the
publish
call will only start the stream when it is actually subscribed, which seems to make sense and works as advertised.The text was updated successfully, but these errors were encountered: