Hey everyone, I was wondering if there has been any thought around implementing server side streaming in apollo/next.js like you get with useSuspenseQuery, useReadQuery etc while maintaining the old useQuery API/not using suspense boundaries everywhere. I don’t know if this sounds really dumb but I wrote a proof of concept here: https://github.com/andrew-d-jackson/apollo-next-suspenseless-streaming that seems to work, though it’s very quick and messy. There is a writeup in the readme of how it works.
I might be an old grump but I don’t like the new suspense APIs for data fetching, not just with apollo but with everything, they are much more verbose and you end up with a mess of useTransitions and fallback components. At the same time streaming data is great and I want the benefits of it: quick initial UI to the client and starting to fetch data before they load + request. In my head and streaming data from the http request are different things and we can do one without the other. Have the old useQuery api where it’s just {loading, data, error} = useQuery()
and stream the data over initially.
I feel like I’m missing something big, and I’m mostly writing this in the hopes that someone will tell me what I’m missing, but my proof of concept seems to show that it’s at least possible. Has there been thought about doing things that way?