Manage Slash GraphQL from the comfort of your command line!
$ npm install -g slash-graphql
$ slash-graphql COMMAND
running command...
$ slash-graphql (-v|--version|version)
slash-graphql/1.12.1 linux-x64 node-v10.19.0
$ slash-graphql --help [COMMAND]
USAGE
$ slash-graphql COMMAND
...
slash-graphql deploy-backend NAME
slash-graphql destroy-backend ID
slash-graphql drop
slash-graphql export-data OUTPUTDIR
slash-graphql get-schema [FILE]
slash-graphql help [COMMAND]
slash-graphql import-data INPUT
slash-graphql list-backends
slash-graphql login
slash-graphql logout
slash-graphql restore-backend
slash-graphql restore-backend-status RESTOREID
slash-graphql update [CHANNEL]
slash-graphql update-backend ID
slash-graphql update-schema [FILE]
Launch a new Backend
USAGE
$ slash-graphql deploy-backend NAME
ARGUMENTS
NAME Backend Name
OPTIONS
-q, --quiet Quiet Output
-r, --region=region [default: us-west-2] Region
-s, --subdomain=subdomain Subdomain
ALIASES
$ slash-graphql create-backend
$ slash-graphql launch-backend
EXAMPLE
$ slash-graphql deploy-backend "My New Backend"
See code: src/commands/deploy-backend.ts
Destroy a Backend by id
USAGE
$ slash-graphql destroy-backend ID
ARGUMENTS
ID Backend id
OPTIONS
-q, --quiet Quiet Output
-y, --confirm Skip Confirmation
EXAMPLE
$ slash-graphql destroy-backend "0xid"
See code: src/commands/destroy-backend.ts
Drop all data in your backend
USAGE
$ slash-graphql drop
OPTIONS
-F, --drop-fields=drop-fields Drop types
-T, --drop-types=drop-types Drop types
-d, --drop-data Drop data and leave the schema
-e, --endpoint=endpoint Slash GraphQL Endpoint
-l, --list-unused List unused types and fields
-q, --quiet Quiet Output
-s, --drop-schema Drop Schema along with the data
-t, --token=token Slash GraphQL Backend API Tokens
-u, --drop-unused Drops all unused types and fields
-y, --confirm Skip Confirmation
EXAMPLE
$ slash-graphql drop -e https://frozen-mango.cloud.dgraph.io/graphql -t <apiToken> [-l] [-d] [-s] [-T <types>] [-F
<fields>]
See code: src/commands/drop.ts
Export data from your backend
USAGE
$ slash-graphql export-data OUTPUTDIR
ARGUMENTS
OUTPUTDIR Output Directory
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
EXAMPLE
$ slash-graphql export-data -e https://frozen-mango.cloud.dgraph.io/graphql -t <apiToken> ./output-directory
See code: src/commands/export-data.ts
Fetch the schema from your backend
USAGE
$ slash-graphql get-schema [FILE]
ARGUMENTS
FILE [default: /dev/stdout] Output File
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-g, --generated-schema Fetch the full schema generated by Slash GraphQL
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
EXAMPLES
$ slash-graphql get-schema -e https://frozen-mango.cloud.dgraph.io/graphql -t <apiToken>
$ slash-graphql get-schema -e 0x42
$ slash-graphql get-schema -e https://frozen-mango.cloud.dgraph.io/graphql -t <apiToken> -g
See code: src/commands/get-schema.ts
display help for slash-graphql
USAGE
$ slash-graphql help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
Import your data back via live loader (requires docker)
USAGE
$ slash-graphql import-data INPUT
ARGUMENTS
INPUT Input Directory
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
-y, --confirm Skip Confirmation
EXAMPLE
$ slash-graphql import-data -e https://frozen-mango.cloud.dgraph.io/graphql -t <apiToken> ./import-directory
See code: src/commands/import-data.ts
List your backends
USAGE
$ slash-graphql list-backends
OPTIONS
-q, --quiet Quiet Output
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
EXAMPLES
$ slash-graphql list-backends
$ slash-graphql list-backends --csv
See code: src/commands/list-backends.ts
Login to Slash GraphQL. Calling this function will keep you logged in for 24 hours, and you will not need to pass access tokens for any backends that you own
USAGE
$ slash-graphql login
OPTIONS
-q, --quiet Quiet Output
EXAMPLE
$ slash-graphql login
See code: src/commands/login.ts
Logout of Slash GraphQL Command Line
USAGE
$ slash-graphql logout
OPTIONS
-a, --all Log out of all command line clients
-q, --quiet Quiet Output
EXAMPLES
$ slash-graphql logout
$ slash-graphql logout -a
See code: src/commands/logout.ts
Restore into a backend by source backend ID
USAGE
$ slash-graphql restore-backend
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-q, --quiet Quiet Output
-s, --source=source (required) Source backend ID or url to get the data to be restored
-t, --token=token Slash GraphQL Backend API Tokens
-y, --confirm Skip Confirmation
EXAMPLE
$ slash-graphql restore-backend -e https://clone.cloud.dgraph.io/graphql -t <apiToken> --source <source backend id or
url>
See code: src/commands/restore-backend.ts
Retrieve the status of a restore operation
USAGE
$ slash-graphql restore-backend-status RESTOREID
ARGUMENTS
RESTOREID Restore ID
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
EXAMPLE
$ slash-graphql restore-backend-status -e https://clone.cloud.dgraph.io/graphql -t <apiToken> "restoreID"
See code: src/commands/restore-backend-status.ts
update the slash-graphql CLI
USAGE
$ slash-graphql update [CHANNEL]
See code: @oclif/plugin-update
Update Backend
USAGE
$ slash-graphql update-backend ID
ARGUMENTS
ID Backend UID
OPTIONS
-n, --name=name Name
-q, --quiet Quiet Output
-y, --confirm Skip Confirmation
EXAMPLE
$ slash-graphql update-backend -n "New Name" 0xid
See code: src/commands/update-backend.ts
Update the schema in your backend
USAGE
$ slash-graphql update-schema [FILE]
ARGUMENTS
FILE [default: /dev/stdin] Input File
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
EXAMPLE
$ slash-graphql update-schema -e https://frozen-mango.cloud.dgraph.io/graphql -t <apiToken> schema-file.graphql
See code: src/commands/update-schema.ts