0.0.7 • Published 6 years ago
@jordilo/apollo-js-generator v0.0.7
Apollo Angular generator
With this package you'll create easilly a data layer for your Angular application from you GraphQL server.
Installation
npm install @jordilo/apollo-js-generatorRun
Before run, configure options as below are explained
npm run graphql-generate-angularConfiguration
Create a file in root of your project named .apollo-configuration
{
"apolloUrl": "https://{YOURDOMAIN}/v1/graphql",
"authotization": "your-site-admin-password",
"getFromUri":true,
"output": "/schema.json",
"outputPath": "/src/graphql"
}| Name | Description |
|---|---|
| apolloUrl | url of the graphql |
| authotization | admin password access for graphql url (you can use GRAPHQL_AUTH environment variable instead) |
| getFromUri (default false) | Flag to download schema from url or previous schema downloaded |
| output | path where schema will be donwload for future uses |
| outputPath | path where graphql module will be generated |
TODOS
- Generate templates from template generator (p.e. mustache)
- Separate each interface in a unique file
- Create Angular Store redux
- Unit test