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

Headers is not defined #2

Closed
dantman opened this issue Jul 7, 2020 · 3 comments
Closed

Headers is not defined #2

dantman opened this issue Jul 7, 2020 · 3 comments

Comments

@dantman
Copy link

dantman commented Jul 7, 2020

I tried using this to expose our GraphQL API on our Vercel based demos. But it doesn't appear this actually works, because Headers is not imported from anywhere.

ReferenceError: Headers is not defined
    at ApolloServer.createHandler (.../node_modules/@saeris/apollo-server-vercel/dist-src/ApolloServer.js:25:25)
    at Object.<anonymous> (.../api/graphql.ts:15:23)
@Saeris
Copy link
Owner

Saeris commented Jul 7, 2020

Yeah so this is still very much in development and I haven't had the time to get it working properly yet. Please do not use it, it definitely will not work.

@Saeris
Copy link
Owner

Saeris commented Aug 17, 2020

@dantman might want to give this another try! Did some more work over the weekend and got all the official Apollo integration tests working. Let me know if you encounter further problems!

@Saeris
Copy link
Owner

Saeris commented Aug 20, 2020

Alright so I guess this is still an issue and I'm working on a fix. Thought I had it working since I was able to use the library in a demo nextjs project, but I'm running into this same problem while trying to add an example api to this repo. Adding node-fetch to polyfill the dom Headers api should be part of the solution, but at this moment I'm still having some issues. I'll update when I've got a fix!

@Saeris Saeris closed this as completed in e2b779e Aug 20, 2020
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

No branches or pull requests

2 participants