如何使用playground而不是graph-i-ql?
gatsby docs - using graphql playground
我已经尝试了几种方法来加载游乐场而不是图-i-ql,更新xcode,使用不同的浏览器,全局安装游乐场,重新启动,等等。我的项目在我的鱼壳中运行gatsby develop后,仍然在http://localhost:8000/___graphql加载图-i-ql。
{
"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"
}
}发布于 2019-05-02 18:46:42
使用npm run develop而不是gatsby develop从package.json运行脚本命令
按照我的脚本中的编写方式,在运行gatsby develop之前,npm run develop会先运行GATSBY_GRAPHQL_IDE=playground,这会导致加载playground,而不是gatsby develop-i-ql。
谢谢你,Derek Nguyen
https://stackoverflow.com/questions/55795508
复制相似问题