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

Node.js HTTP2 error #3803

Open
Lugribossk opened this issue Feb 21, 2025 · 0 comments · May be fixed by ardatan/whatwg-node#2093
Open

Node.js HTTP2 error #3803

Lugribossk opened this issue Feb 21, 2025 · 0 comments · May be fixed by ardatan/whatwg-node#2093

Comments

@Lugribossk
Copy link

Describe the bug

When trying to run the server using the Node.js http2 module and createSecureServer(), requests always return this error:

    {
      "message": "POST body sent invalid JSON.",
      "extensions": {
        "code": "BAD_REQUEST",
        "originalError": {
          "name": "TypeError",
          "message": "bodyInit.stream is not a function"
        }
      }
    }

Your Example Website or App

https://codesandbox.io/p/devbox/great-fog-v5xjzq?file=%2Fsrc%2Fmain.ts%3A41%2C1

Steps to Reproduce the Bug or Issue

  1. Create a cert for localhost with https://github.com/FiloSottile/mkcert (mkcert -install, mkcert localhost)
  2. Run the example code.
  3. Make a request to the server, e.g. with Graphiql.

Expected behavior

The request should have worked normally. Or perhaps that there should have been a Typescript error indicating that createSecureServer and yoga are incompatible.

Screenshots or Videos

No response

Platform

  • OS: Windows 11
  • NodeJS: 22.14.0
  • @graphql-yoga/* version(s): 5.12.0

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant