graphboss-cli
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) [![Version](https://img.shields.io/npm/v/graphboss-cli.svg)](https://npmjs.org/package/graphboss-cli) [![Downloads/week](https://img.shields.io/npm/dw/graphboss-cli.svg)]
Last updated 4 months ago by richbuggy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install graphboss-cli 
SYNC missed versions from official npm registry.

graphboss cli

oclif Version Downloads/week License

Usage

$ npm install -g graphboss-cli
$ graphboss COMMAND
running command...
$ graphboss (-v|--version|version)
graphboss-cli/0.1.2 darwin-x64 node-v12.13.0
$ graphboss --help [COMMAND]
USAGE
  $ graphboss COMMAND
...

Commands

graphboss amplify

Generate a CloudFormation stack from the GraphQL schema using the AWS Amplify code generator

USAGE
  $ graphboss amplify

OPTIONS
  -c, --config=config  config file (default: "graphboss.json")
  -d, --dest=dest      destination folder to generate output into (default: "generated")
  -f, --force
  -h, --help           show CLI help
  -s, --schema=schema  graphql schema file (default: "schema.graphql")

EXAMPLE
  $ graphboss amplify --config=graphboss.json --dest=generated --schema=schema.graphql --force

Config File

The config file is JSON object with the Amplify authConfig settings.

{
  "authConfig": {
    "defaultAuthentication": AppSyncAuthConfigurationEntry,
    "additionalAuthenticationProviders": [AppSyncAuthConfigurationEntry] // optional
  }
}

The value for AppSyncAuthConfigurationEntry depends on the authenticationType.

API_KEY

{
  "authenticationType": "API_KEY",
  "apiKeyConfig": {
    "description": "API Key Description", // optional
    "apiKeyExpirationDays": 365
  }
}

AMAZON_COGNITO_USER_POOLS

{
  "authenticationType": "AMAZON_COGNITO_USER_POOLS"
}

You will need to override the AuthCognitoUserPoolId stack parameter when deploying to set the Cognito User Pool ID.

AWS_IAM

{
  "authenticationType": "AWS_IAM"
}

OPENID_CONNECT

{
    "authenticationType": "OPENID_CONNECT",
    "openIDConnectConfig": {
      "name": "Name",
      "issuerUrl": "Issuer URL",
      "clientId": "Client ID", // optional
      "iatTTL": number, // optional
      "authTTL": number // optional
    }
}

Usage

After generating the output you can package and deploy using stacks/template.yaml from the output folder. For example:

> rm -rf generated && graphboss amplify
> cd generated/stacks
> aws cloudformation package --template-file template.yaml --output-template-file packaged.yaml --s3-bucket piiq-deploy-us-west-2-dev --profile <YOUR AWS PROFILE NAME> --region <AWS REGION>
> aws cloudformation deploy --template-file packaged.yaml --stack-name <YOUR STACK NAME> --capabilities CAPABILITY_AUTO_EXPAND CAPABILITY_NAMED_IAM --profile <YOUR AWS PROFILE NAME> --region <AWS REGION>

See code: src/commands/amplify.ts

graphboss help [COMMAND]

display help for graphboss

USAGE
  $ graphboss help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

Current Tags

  • 0.1.2                                ...           latest (4 months ago)

3 Versions

  • 0.1.2                                ...           4 months ago
  • 0.1.1                                ...           4 months ago
  • 0.1.0                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 3
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |