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

Error in production on Heroku #109

Closed
thebetternewt opened this issue Feb 28, 2019 · 2 comments
Closed

Error in production on Heroku #109

thebetternewt opened this issue Feb 28, 2019 · 2 comments
Labels

Comments

@thebetternewt
Copy link

Hi. Great graphQL plugin! Thank you!

I am having an issue deploying to Heroku with express. I am actually using apollo-server-express for my server. Voyager works perfectly fine when running in development locally, but when deployed to production, I get the following error:

TypeError: Cannot read property '__schema' of undefined

I get the "Loading..." screen, and then Voyager flashes for a moment. Then things go blank and I get the error message in the console along with a POST 400 Bad Request error.

Is there something special I need to do to get Voyager to work with Express running on Heroku?

Thanks!

@IvanGoncharov
Copy link
Member

@thebetternewt apollo-server-express disable introspection in production:

The default behavior of apollo-server's integrated graphql-playground is for it to be disabled (along with introspection queries) when NODE_ENV=production.

apollographql/apollo-server#1571 (comment)

@isihu
Copy link

isihu commented Jul 29, 2021

For anyone stumbling over this, the issue can be fixed by setting the MaximumQueryDepth param to a really high number or simply removing it. This is not something you wanna do for production, ofc.

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

No branches or pull requests

3 participants