Apollo Angular Code Generation Example
December 19, 2018 ยท View on GitHub
Write .graphql files, use auto generated Angular services.
It's all possible thanks to:
- apollo-angular
- graphql-code-generator
- graphql-codegen-typescript-apollo-angular
1. Install
yarn
# or
npm install
2. Generate all
yarn graphql
# or
npm run graphql
3. Ready to go!
All documents from src/app/graphql were generated into services that you can find in src/app/generated/graphql.ts