Great article, thank you.
But how is it possible to define backend url for WebSocket object? You hardcode it here, but not clear, how to define it on frontend dynamically.
For my experiment I didn't bother figuring that out. But when I deployed my example app I did change it to wss://app-url.com/.redwood/functions/ws to get around CORS limitations (where .redwood/functions/ is proxied to my api side by my hosting setup, just like all graphql requests are proxied)