-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I needed subscriptions in my project and in the end had to make a different server for graphql yoga because graphql-ws subscriptions wouldn't work with Elysia.
The main issues are:
- Elysia websocket handlers have a separate type than bun websocket handlers, so this example from the graphql ws library doesn't work out of the box: https://the-guild.dev/graphql/ws/get-started#with-bun
- The handler from the example for uWebSocket.js satisfies the type, but functionally also doesn't work, I think that's designed for uWebSocket servers, and not bun servers.
- GraphQL SSE also doesn't quite work, in all the examples for GraphQL SSE with the graphql-sse client, the url that the client connects to is /graphql/stream, a URL that elysia graphql yoga don't expose: https://the-guild.dev/graphql/sse/recipes#client-usage
Because of all these limitations, I had to literally create a separate server and then handle metrics collection, logs collection, etc. for that server again.
I think this is something important, and shouldn't be too hard to add? I'm going to attempt a PR for this @SaltyAom I will try to make the websocket handlers work first, then expose the /graphql/stream url and make it work
Related to: #11
nephix
Metadata
Metadata
Assignees
Labels
No labels