我的项目仍在使用 graph-i-ql 而不是 playground
My project is still using graph-i-ql instead of playground
如何使用 playground 而不是 graph-i-ql?
gatsby docs - using graphql playground
我尝试了几种加载 playground 而不是 graph-i-ql 的方法,更新了 xcode,使用了不同的浏览器,全局安装了 playground,重新启动等。我的项目仍在加载 graph-i -ql at http://localhost:8000/___graphql after 运行 gatsby develop
in my fish shell.
{
"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"
}
}
使用 npm run develop
而不是 gatsby develop
从 package.json
运行脚本命令
它在我的脚本中的编写方式 npm run develop
在运行 GATSBY_GRAPHQL_IDE=playground
之前先运行 gatsby develop
这会导致加载 playground 而不是 graph-i-ql。
如何使用 playground 而不是 graph-i-ql?
gatsby docs - using graphql playground
我尝试了几种加载 playground 而不是 graph-i-ql 的方法,更新了 xcode,使用了不同的浏览器,全局安装了 playground,重新启动等。我的项目仍在加载 graph-i -ql at http://localhost:8000/___graphql after 运行 gatsby develop
in my fish shell.
{
"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"
}
}
使用 npm run develop
而不是 gatsby develop
从 package.json
它在我的脚本中的编写方式 npm run develop
在运行 GATSBY_GRAPHQL_IDE=playground
之前先运行 gatsby develop
这会导致加载 playground 而不是 graph-i-ql。