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 by npm 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
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 introspection: true to your config.
Thank you so much! It's working now.
It's really working.
i tried passing both values to true i.e
{
playground : true,
introspection: true
}
not working for me :(
Most helpful comment
Thank you so much! It's working now.