-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Server works locally but not on Heroku after following all given steps #1718
Comments
By default, both the playground and introspection queries are disabled in production. You've manually enabled the playground but not the introspection query, which results in the error you see, but your API is working fine already. You can actually make queries in the playground if you ignore the error: The solution will be to add |
Thank you so much! It's working now. |
It's really working. |
i tried passing both values to true i.e |
I did the same as @surajkrishan But still it is not working |
Note that Apollo Server 3 does not have a top-level |
Intended Outcome:
I made a server using GraphQL and Apollo that works locally, and would expect that when I add the needed changes (a Procfile, Environment variables, etc), and try to deploy it to Heroku, it would work.
Actual Outcome:
The server code works locally, for example, on localhost:4000, but when on Heroku, it deploys successfully but then the GraphQL Playground says that the Server cannot be reached, and in the right hand, results side of the page, it shows "error": "Failed to fetch schema. Please check your connection"
How to Reproduce the Issue:
You can see the problem here- http://vr-test-server.herokuapp.com/
If you want to pull the code itself, for local and for production, the repository can be cloned by
git clone https://github.com/Naman-Goyal/VRUncannyValleyServer.git
The project can be built by running
npm install
, and run bynpm start
The local version of the server is on the "Local" branch
The production version of the server that is set up to push to heroku is on the "Production" branch
The text was updated successfully, but these errors were encountered: