Install the graphql command.
npm i graphql-cliInstall the followin extensions for the graphql command and the code generation.
npm i @graphql-cli/codegen @graphql-cli/coverage @graphql-cli/diff @graphql-cli/similar @graphql-cli/validate @graphql-codegen/schema-ast @graphql-codegen/typescript @graphql-codegen/typescript-operations @graphql-codegen/typescript-react-apollo @graphql-codegen/typescript-resolversIn your package.json add the following scripts.
"scripts": {
"graphql:codegen": "graphql codegen",
"graphql:coverage": "graphql coverage",
"graphql:validate": "graphql validate",
"graphql:diff": "graphql diff",
"graphql:similar": "graphql similar"
},Execute the command graphql:codegen to generate the needed schema.graphql and types.