我正在关注这个。
我@graphql-codegen/cli
作为开发依赖项安装在这里是我的package.json
.
{
"dependencies": {
"@apollo/client": "^3.4.8",
"graphql": "^15.5.1",
"next": "11.1.0",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@graphql-codegen/cli": "^2.1.1",
"@graphql-codegen/typescript-react-apollo": "^3.1.0",
"@types/react": "^17.0.18",
"eslint": "7.32.0",
"eslint-config-next": "11.1.0",
"graphql-codegen": "^0.4.0",
"typescript": "^4.3.5"
}
}
当我运行时:
yarn graphql-codegen init
我收到此错误:
...
Error: Unknown argument: init
...
谁能告诉我这里出了什么问题!