Open maoosi opened 1 year ago
Hi @maoosi
This is a workaround:
export default createYoga({
fetchAPI: { fetch, Request, ReadableStream, Response }, // <--- Add Node.js native APIs
graphqlEndpoint: '/',
schema: createSchema({
typeDefs: /* GraphQL */ `
type Query {
hello: String
}
`,
resolvers: {
Query: {
hello: () => 'world'
}
}
})
})
Thanks @yusukebe, your suggested workaround is working good on my end!
Issue
Since updating to @hono/node-server@1.0.0, I'm having an issue using GraphQL Yoga. The server immediately crashes with the below message:
Reproduction
I have created a minimal reproduction on https://codesandbox.io/p/sandbox/optimistic-lichterman-tvsgh8
Workaround
Rolling back to @hono/node-server@0.6.0 fixes the issue.