Looking for the Prisma documentation? You can find it here

Overview

Last updated a day ago Edit this page

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 graphcool.yml.

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:

graphcool init

Or, using the short form of the graphcool command:

gfc init

#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.

#The GRAPHCOOL_TARGET environment variable

Almost all CLI commands related to service management accept the --target option. If this option is not provided, the default target from your local .graphcoolrc will be used.

It is possible to override the default option using an environment variable called GRAPHCOOL_TARGET:

export GRAPHCOOL_TARGET=shared-eu-west-1/cj8vn13me01er0147a280yhwn
graphcool deploy # runs without having a .graphcoolrc or overrides its `default` entry

Was this page helpful?