svelte-add / graphql-server

⚠️ MOVED: https://github.com/svelte-add/svelte-add/ ⚠️ (out of date) A command to add a GraphQL server to your Svelte project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support multipart responses or event streams

babichjacob opened this issue · comments

commented

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?

commented

Upstream issue: sveltejs/kit#1563

commented

Any updates about this ?

commented

Any updates about this ?

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

commented

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 ?

commented

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.

commented

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