GraphQL Playground Server Cannot Be Reached Running Locally
See original GitHub issueThis issue pertains to the following package(s):
- GraphQL Playground
What OS and OS version are you experiencing the issue(s) on?
Windows 10
What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?
2.16.7
What is the expected behavior?
Following How to GraphQL Node tutorial and on Connecting Server and Database with Prisma Bindings.
On step “Accessing both GraphQL APIs inside the same Playground”. After running node src/index.js
in hackernews-node folder to start and opening separate terminal for graphql playground
anticipating being able to work with both GraphQL APIs side-by-side.
What is the actual behavior?
Playground opens up and can access database GraphQL API but app GraphQL API says “Server cannot be reached” and “error”: “Failed to fetch schema. Please check your connection” Terminal has no errors and says I’m running locally on 4000 for app and playground on localhost 3000/playground.
What steps may we take to reproduce the behavior?
Run node project locally and then GraphQL playground. I’ve uploaded my current code to my repositories under GraphQL-Node.
Please provide a gif or image of the issue for a quicker response/fix.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:17
- Comments:45 (2 by maintainers)
I am getting same issue
@joanprimpratrec2 thank you! almost same for me
for newcomers -> check your server.start() method and add playground into that.
in my case
process.env.PLAYGROUND_URL === "http://localhost:3000"