| # Prepation | # Prepation | ||||
| ``npm init`` | |||||
| ``` | |||||
| npm init | |||||
| ``` | |||||
| See More <https://graphql-code-generator.com/docs/getting-started/installation> | See More <https://graphql-code-generator.com/docs/getting-started/installation> | ||||
| ``npm add --save graphql`` | |||||
| ``` | |||||
| npm add --save graphql | |||||
| ``` | |||||
| or | or | ||||
| ``yarn add graphql`` | |||||
| ``` | |||||
| yarn add graphql | |||||
| ``` | |||||
| ``npm add --save-dev @graphql-codegen/cli`` | |||||
| ``` | |||||
| npm add --save-dev @graphql-codegen/cli | |||||
| ``` | |||||
| or | or | ||||
| ``yarn add -D @graphql-codegen/cli`` | |||||
| ``` | |||||
| yarn add -D @graphql-codegen/cli | |||||
| ``` | |||||
| ``npx graphql-codegen init`` | |||||
| ``` | |||||
| npx graphql-codegen init | |||||
| ``` | |||||
| ``npm add --save-dev @graphql-codegen/typescript`` | |||||
| ``` | |||||
| npm add --save-dev @graphql-codegen/typescript | |||||
| ``` | |||||
| or | or | ||||
| ``yarn add -D @graphql-codegen/typescript`` | |||||
| ``` | |||||
| yarn add -D @graphql-codegen/typescript | |||||
| ``` | |||||
| # Server | # Server | ||||
| ``npm add apollo-server`` | |||||
| ``` | |||||
| npm add apollo-server | |||||
| ``` | |||||
| ``npm install @types/node --save-dev`` | |||||
| ``` | |||||
| npm install @types/node --save-dev | |||||
| ``` | |||||
| ``` | ``` | ||||
| npx tsc --init --rootDir src --outDir build \ | npx tsc --init --rootDir src --outDir build \ | ||||
| --module commonjs --allowJs true --noImplicitAny true | --module commonjs --allowJs true --noImplicitAny true | ||||
| ``` | ``` | ||||
| ``npm install --save-dev ts-node nodemon rimraf`` | |||||
| ``` | |||||
| npm install --save-dev ts-node nodemon rimraf | |||||
| ``` | |||||
| # UI | # UI | ||||
| * init new Angular project ``ng new graphql-demo`` | |||||
| * init new Angular project | |||||
| ``` | |||||
| ng new graphql-demo | |||||
| ``` |