I'm following this.
I installed @graphql-codegen/cli
as a Dev dependency here is my 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"
}
}
When i run:
yarn graphql-codegen init
I'm getting this error:
...
Error: Unknown argument: init
...
Can someone tell me what's wrong here!