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
MIT License
31 stars 1 forks source link

Support multipart responses or event streams #1

Open babichjacob opened 3 years ago

babichjacob commented 3 years ago

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 commented 3 years ago

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

ibilux commented 3 years ago

Any updates about this ?

babichjacob commented 3 years ago

Any updates about this ?

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

ibilux commented 3 years ago

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 ?

babichjacob commented 3 years ago

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.

ibilux commented 3 years ago

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

omar-shahid commented 1 year ago

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