Search code examples
graphqlgatsbyprisma-graphqlgraphiql

My project is still using graph-i-ql instead of playground


How can I use playground instead of graph-i-ql?

gatsby docs - using graphql playground

I have tried a couple of ways to load playground instead of graph-i-ql, Updated xcode, used different browsers, globally installed playground, rebooted, etc. My project is still loading graph-i-ql at http://localhost:8000/___graphql after running gatsby develop in my fish shell.

my github repo

{
  "name": "gatsby-bootcamp",
  "private": true,
  "description": "Gatsby Bootcamp by Andrew Mead",
  "version": "0.1.0",
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "GATSBY_GRAPHQL_IDE=playground gatsby develop",
    "format": "prettier --write src/**/*.{js,jsx}",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\""
  },
  "dependencies": {
    "babel-plugin-styled-components": "^1.10.0",
    "gatsby": "^2.3.16",
    "gatsby-cli": "^2.5.9",
    "gatsby-plugin-styled-components": "^3.0.7",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "styled-components": "^4.2.0"
  },
  "devDependencies": {
    "graphql-playground": "^1.3.17",
    "prettier": "^1.17.0"
  }
}

Solution

  • Using npm run develop instead of gatsby develop runs the scripts command from package.json

    The way it is written in my scripts npm run develop runs GATSBY_GRAPHQL_IDE=playground before it runs gatsby develop This causes playground to load instead of graph-i-ql.

    thank you Derek Nguyen