FormidableLabs / next-urql

Convenience utilities for using urql with NextJS.
MIT License
56 stars 7 forks source link

useSubscription hook usage example #11

Closed sgrove closed 4 years ago

sgrove commented 4 years ago

I'd like to make use of the useSubscription hook when the app is running client-side, and it'd be nice to have the same code run at SSR time. Is it possible to use useSubscription server-side, and if so, is there an example somewhere?

parkerziegler commented 4 years ago

👋 Hey Sean, sorry it's taken me a long time to get back to you on this one. AFAIK there's no support for running useSubscription server-side right now. @kitten and I chatted briefly about this a few weeks back, and while it sounds like it could theoretically be supported, it isn't right now.

Is the situation you're running into that you need to get some initial data server-side before setting up the subscription? If you can give some more context on what you're hoping to achieve with useSubscription on the server we can maybe brainstorm some solutions.

parkerziegler commented 4 years ago

@sgrove if you're still interested in this issue please open a new issue over in the urql repo. In an effort to better coordinate development efforts we've moved this package there.