An overview of the Graphcool CLI.
The Graphcool CLI is the primary tool to manage your Graphcool services. Generally, the shape and contents of a Graphcool service are determined by the service definition file
The CLI offers tools to modify the local version of your service definition and file structure as well as syncing these changes with already deployed services.
Installation & Usage
You can install the Graphcool Framework CLI with NPM:
npm install -g graphcool
Once the CLI is installed on your machine, you can invoke it as follows:
Or, using the short form of the
Using command line options
Most of the CLI commands accept specific arguments (options) that you can provide when invoking the command.
For each option that you provide, you can use either of the following two forms:
- Long form: Spell out the full name of the option prepended by two dashes, e.g.
graphcool deploy --target prod.
- Short form: Take only a single letter of the option's name (most of the time, this is the very first letter) and prepend with only one dash, e.g.
graphcool deploy -t prod.
GRAPHCOOL_TARGET environment variable
It is possible to override the
default option using an environment variable called
export GRAPHCOOL_TARGET=shared-eu-west-1/cj8vn13me01er0147a280yhwn graphcool deploy # runs without having a .graphcoolrc or overrides its `default` entry