Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Subscription #23

Closed
maimaiyeuem12009 opened this issue Nov 18, 2022 · 3 comments · Fixed by #98
Closed

Using Subscription #23

maimaiyeuem12009 opened this issue Nov 18, 2022 · 3 comments · Fixed by #98
Labels
enhancement New feature or request status: blocked

Comments

@maimaiyeuem12009
Copy link

Hello, I tried to used graphql-ws with apollo server follow https://www.apollographql.com/docs/apollo-server/data/subscriptions but I could not get it working. I have try to pass both express and h3 server to createServer but still get the error: not support grahql-ws can you help me ?

@tobiasdiez
Copy link
Owner

tobiasdiez commented Nov 20, 2022

Websockets are currently not yet supported by h3/nuxt. There are a few workarounds (relatively easy for dev server, pretty hacky for production). I've raised unjs/nitro#678 to discuss proper ws support with nuxt.

Maybe relevant: nuxt/nuxt#19230

@wokalek
Copy link

wokalek commented Mar 16, 2024

Is it still blocked or resolved? h3 supports ws tho

@tobiasdiez
Copy link
Owner

@wokalek Thanks for the pointer. Indeed, h3 now supports ws via crossws and it was pretty straightforward to implement graphql-ws support on top it. For me, it's working great so far, and I will include it in the apollo-server h3-integration package: apollo-server-integrations/apollo-server-integration-h3#65. Would be awesome if you could give it a try and report back if you encounter any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status: blocked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants