-
Notifications
You must be signed in to change notification settings - Fork 573
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 + Typescript type mismatch: Argument of type 'YogaServerInstance<{}, {}>' is not assignable to parameter of type 'Serve<unknown>' #3003
Comments
It seems the types has changed on 1.0.0 release. Bun.serve({
fetch: yoga
}) |
This seems to be fixed now |
I just ran into an issue similar to this one after updating some packages to the latest (stable) versions
Changing the following resolved this error for me:
|
thanks @DuckThom , same issue here. Could be fixed with you change! I will add a comment to https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-bun |
Fix a TypeScript issue resulting from a breaking change in either Bun or Yoga. The error is detailed here: - dotansimha#3003 (comment) - dotansimha#2644 (comment) - dotansimha#3003 (comment) This PR fixes the error.
Describe the bug
I'm following the instruction to create a minimum GraphQL server locally https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-bun
It runs successfully and I can see graphiql UI at http://localhost:3000/graphql
However, I'm encountering this type error when performing typescript type checking:
Your Example Website or App
https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-bun
Steps to Reproduce the Bug or Issue
bun init
bun add graphql-yoga graphql typescript
index.ts
bun run index.ts
should work just finetsc
will show the error.Expected behavior
I expect there is no TS errors.
Screenshots or Videos
No response
Platform
Additional context
Thanks!
The text was updated successfully, but these errors were encountered: