0.0.7 • Published 4 years ago

@jordilo/apollo-js-generator v0.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

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-generator

Run

Before run, configure options as below are explained

  npm run graphql-generate-angular

Configuration

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"
  }
NameDescription
apolloUrlurl of the graphql
authotizationadmin 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
outputpath where schema will be donwload for future uses
outputPathpath 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