graphql-server icon indicating copy to clipboard operation
graphql-server copied to clipboard

Support multipart responses or event streams

Open babichjacob opened this issue 5 years ago • 7 comments

graphql-helix's README shows an example for Express(-like) servers. We meet it 1:1 until the else if (result.type === "MULTIPART_RESPONSE") { point.

In SvelteKit's Node adapter, the underlying server is actually made from the http library in Node, and we don't have access to the server in endpoints.

So, everything that can be returned needs to be returned all together.

Can we do anything to condense a multipart response or event stream?

babichjacob avatar Nov 25 '20 06:11 babichjacob

Upstream issue: https://github.com/sveltejs/kit/issues/1563

babichjacob avatar May 26 '21 20:05 babichjacob

Any updates about this ?

ibilux avatar Aug 21 '21 02:08 ibilux

Any updates about this ?

See the linked issue, which has been very active recently.

babichjacob avatar Aug 21 '21 02:08 babichjacob

See the linked issue, which has been very active recently.

Yeah I have been checking it, but to be honest I'm not familiar about streaming. Is there any eta or a near solution ?

ibilux avatar Aug 21 '21 02:08 ibilux

Is there any eta or a near solution ?

It's up to there being an accepted resolution and implementation in SvelteKit core, but then I would need help updating this tool to make use of it—I don't personally know how GraphQL subscriptions or multipart responses work so I don't know how to implement or test them.

babichjacob avatar Aug 21 '21 18:08 babichjacob

@babichjacob we will try to implement it when they accepted and merge it.

ibilux avatar Aug 21 '21 18:08 ibilux

Is this project still alive? I would like to help with this issue.

omar-shahid avatar Aug 27 '23 07:08 omar-shahid