This starter project contains tools and configuration to start consuming a GraphQL API.
What is provided:
- Angular project generated by the Angular CLI
- Apollo Angular
- GraphQL Code Generator to generate typings and Apollo services
- Prettier for automated code formatting through pre-commit hooks
- Update
./src/environments/environment.ts
with the URL to your GraphQL server - Update
./codegen.yml
with the URL to your GraphQL server - Create
.graphql
file(s) containing your GraphQL queries, mutations, and subscriptions in its respective folder in./src/app/graphql/
- Run the code generator:
npm run graphql-codegen
You are now ready to start developing your Angular project.