0.6.7 • Public • Published

This is CLI project related with GAPI graphQL api with typescript Decorators


Gapi - Advanced graphql server with typescript decorators

Starter - Basic starter project

Starter-advanced - Advanced starter project

Gapi-angular-client - Gapi Apollo Angular client

To install gapi utility type following command:

npm i -g gapi-cli

To create new basic project from scratch via CLI type:

gapi new my-project

To create new advanced project from scratch via CLI type:

gapi new my-project --advanced

Available commands

Create new project
gapi new project-name
Start created project.
gapi start
(Uses internally on every restart to introspect api schema check "gapi schema introspect" command)
Can be disabled inside package.json > nodemonConfig > events > restart
With this configuration it will make request to localhost:9000 and will take current API schema then will generate graphql.d.ts based on introspection
    "events": {
      "restart": "sleep 1 && gapi schema introspect"
Start production (it will start pm2 and will use process.yml file inside working directory)
gapi start --prod
Start production inside Docker(it will start pm2-docker and will use process.yml file inside working directory)
gapi start --prod --docker

Start testing

Run single test iteration
Will take config > test > local configuration inside gapi-cli.conf.yml
gapi test
Run tests in watch mode
gapi test --watch
Run tests with different environment
It will take configuration from gapi-cli.conf.yml
You can extend configurations from APP when you write after environment "extends app/my-environment"

Custom testing environments

      API_PORT: 9000
      API_CERT: ./cert.key
      NODE_ENV: development
      AMQP_PORT: 5672
      ENDPOINT_TESTING: http://localhost:9000/graphql
      API_PORT: 9000
      API_CERT: ./cert.key
      NODE_ENV: production
      AMQP_PORT: 5672
      API_PORT: 9000
      API_CERT: ./cert.key
      NODE_ENV: development
      AMQP_PORT: 5672
      ENDPOINT_TESTING: http://localhost:9000/graphql
    my-environment: extends app/my-environment
    local: extends app/local
    prod: extends app/prod
      API_PORT: 9000
      API_CERT: ./cert.key
      NODE_ENV: production
      AMQP_PORT: 5672
Running with Testing worker environment
gapi test --worker

Running with Production environment

gapi test --prod
Running with custom enviroment
gapi test --my-enviroment


Schema introspection
It will generate graphql.d.ts file based on given address and output folder
Uses gapi-cli.conf.yml file
    introspectionEndpoint: http://localhost:9000/graphql
    introspectionOutputFolder: ./src/app/core/api-introspection
gapi schema introspect
Available shared commands are:
--verbose - Show better logging


npm i gapi-cli

DownloadsWeekly Downloads






Unpacked Size

1.47 MB

Total Files


Last publish


  • kristian.tachev