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

Bun integration on subscription (Query and Mutation Works, but not Subscription) #7776

Closed
HuakunShen opened this issue Nov 2, 2023 · 3 comments

Comments

@HuakunShen
Copy link

I was using bun to run apollo server and nestjs, it worked fine, both Query and Mutation works normally, but when I start working on subscription it always fails to connect (I was using the apollo playground).

No error was shown, after debugging for a few hours I realized that it's bun runtime that causes the problem.

I followed this tutorial https://www.apollographql.com/docs/apollo-server/data/subscriptions#basic-runnable-example

Subscription works fine when using nodejs or ts-node-esm, but fails as long as I switch to bun.

Reproduction

bun install
bun src/index.ts

Bun is a really good tool. It allows me to import typescript from other packages without compiling to JS. I can't really switch to nodejs for the project.

I used WebSocket with bun, it works.
There is no error message, so I don't know what's going on. Apollo Server is probably using some API bun doesn't implement.

@HuakunShen
Copy link
Author

Here is an issue I made in bun repo.

oven-sh/bun#6905

@trevor-scheer
Copy link
Member

I would be happy for this project to support Bun, but I don't have the time to take on this work. I will gladly help with and review a PR which resolves this if you're interested in trying to fix it.

I've outlined my desired approach in another issue:
#7733 (comment)

I'm going to close this as a duplicate of #7733 and specifically mention subscriptions there as well. Which subscription library were you using? That part is likely a separate issue for a separate project.

@trevor-scheer trevor-scheer closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
Copy link
Contributor

github-actions bot commented Dec 9, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants