I have a svelte app and onMount function I create and open an event stream and onDestroy function I want to close the stream.
When I am on the page and I hit refresh it displays an error saying smth like faunaStream is null.
When I just leave the page, this works correctly.
And this a behavior that I am trying to debug in svelte but I also want to actually inspect the fauna streams (either using fauna js driver, either using fql in shell, or any other option available that I am not aware of)
When you construct a stream, you have to hold onto the returned object. If you lose the object, there is no mechanism provided to recover it, nor to provide a list of any streams that might be open.
It sounds like your app might be losing track of the stream object somehow. Or, on page refresh, perhaps onMount is not being called? The error you reported does not come from the JS driver, so I expect it comes from the Svelte middleware.
I’m not familiar with Svelte so I can’t provide any further details. Maybe someone else with Svelte experience can provide some suggestions.