README
slash-graphql
Manage Slash GraphQL from the comfort of your command line!
Usage
$ npm install -g slash-graphql
$ slash-graphql COMMAND
running command...
$ slash-graphql (-v|--version|version)
slash-graphql/1.18.0 darwin-x64 node-v14.9.0
$ slash-graphql --help [COMMAND]
USAGE
$ slash-graphql COMMAND
...
Commands
slash-graphql add-member-to-organization ORGANIZATION MEMBER
slash-graphql create-organization NAME
slash-graphql delete-lambda
slash-graphql deploy-backend NAME
slash-graphql destroy-backend ID
slash-graphql drop
slash-graphql export-data OUTPUTDIR
slash-graphql get-lambda
slash-graphql get-schema [FILE]
slash-graphql help [COMMAND]
slash-graphql import-data INPUT
slash-graphql lambda-logs
slash-graphql list-backends
slash-graphql list-backups
slash-graphql list-organizations
slash-graphql login EMAIL PASSWORD
slash-graphql logout
slash-graphql remove-member-from-organization ORGANIZATION MEMBER
slash-graphql restore-backend
slash-graphql restore-backend-status RESTOREID
slash-graphql update [CHANNEL]
slash-graphql update-backend
slash-graphql update-lambda
slash-graphql update-schema [FILE]
slash-graphql add-member-to-organization ORGANIZATION MEMBER
Add a Member to an Organization
USAGE
$ slash-graphql add-member-to-organization ORGANIZATION MEMBER
ARGUMENTS
ORGANIZATION Organization Name
MEMBER Member Email Address
OPTIONS
-q, --quiet Quiet Output
EXAMPLE
$ slash-graphql add-member-to-organization 0x123 user@dgraph.io
See code: src/commands/add-member-to-organization.ts
slash-graphql create-organization NAME
Create an Organization
USAGE
$ slash-graphql create-organization NAME
ARGUMENTS
NAME Organization Name
OPTIONS
-q, --quiet Quiet Output
EXAMPLE
$ slash-graphql create-organization myNewOrganization
See code: src/commands/create-organization.ts
slash-graphql delete-lambda
Delete the Lambda script associated with the backend.
USAGE
$ slash-graphql delete-lambda
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
-y, --confirm Skip Confirmation
EXAMPLES
$ slash-graphql delete-lambda -e https://frozen-mango.cloud.dgraph.io/graphql
$ slash-graphql delete-lambda -e 0x1234
See code: src/commands/delete-lambda.ts
slash-graphql deploy-backend NAME
Launch a new Backend
USAGE
$ slash-graphql deploy-backend NAME
ARGUMENTS
NAME Backend Name
OPTIONS
-T, --type=slash-graphql|dedicated [default: slash-graphql] Backend Type
-m, --mode=readonly|graphql|flexible [default: graphql] Backend Mode
-o, --organizationId=organizationId Organization ID
-q, --quiet Quiet Output
-r, --region=region Region
-s, --subdomain=subdomain Subdomain
--acl=true|false [default: false] Enable ACL (Only works for dedicated backends)
--dataFile=dataFile Data File Path for Bulk Loader (Only works for dedicated backends)
--dgraphHA=true|false [default: false] Enable High Availability (Only works for dedicated backends)
--gqlSchemaFile=gqlSchemaFile GQL Schema File Path for Bulk Loader (Only works for dedicated backends)
--jaeger=true|false [default: false] Enable Jaeger (Only works for dedicated backends)
--schemaFile=schemaFile Dgraph Schema File Path for Bulk Loader (Only works for dedicated backends)
--size=small|medium|large|xlarge [default: small] Backend Size (Only Works for dedicated backends)
--storage=storage [default: 10] Alpha Storage in GBs - Accepts Only Integers (Only Works for
dedicated backends)
ALIASES
$ slash-graphql create-backend
$ slash-graphql launch-backend
EXAMPLES
$ slash-graphql deploy-backend "My New Backend"
$ slash-graphql deploy-backend "My New Backend"
See code: src/commands/deploy-backend.ts
slash-graphql destroy-backend ID
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
slash-graphql drop
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
slash-graphql export-data OUTPUTDIR
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
slash-graphql get-lambda
Get the Lambda script associated with the backend.
USAGE
$ slash-graphql get-lambda
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
EXAMPLES
$ slash-graphql get-lambda -e https://frozen-mango.cloud.dgraph.io/graphql
$ slash-graphql get-lambda -e 0x1234
See code: src/commands/get-lambda.ts
slash-graphql get-schema [FILE]
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
slash-graphql help [COMMAND]
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
slash-graphql import-data INPUT
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
slash-graphql lambda-logs
Get the Lambda script associated with the backend.
USAGE
$ slash-graphql lambda-logs
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-h, --hours=hours [default: 1] Show lambda logs for last given hours. Defaults to 1 hour.
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
EXAMPLES
$ slash-graphql lambda-logs -e https://frozen-mango.cloud.dgraph.io/graphql
$ slash-graphql lambda-logs -e 0x1234 -h 5
See code: src/commands/lambda-logs.ts
slash-graphql list-backends
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
slash-graphql list-backups
List all backups of the current backend
USAGE
$ slash-graphql list-backups
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
EXAMPLE
$ slash-graphql list-backups -e https://frozen-mango.cloud.dgraph.io/graphql -t <apiToken>
See code: src/commands/list-backups.ts
slash-graphql list-organizations
List Organizations associated with the user
USAGE
$ slash-graphql list-organizations
OPTIONS
-q, --quiet Quiet Output
EXAMPLE
$ slash-graphql list-organizations
See code: src/commands/list-organizations.ts
slash-graphql login EMAIL PASSWORD
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 EMAIL PASSWORD
OPTIONS
-q, --quiet Quiet Output
EXAMPLE
$ slash-graphql login email password
See code: src/commands/login.ts
slash-graphql logout
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
slash-graphql remove-member-from-organization ORGANIZATION MEMBER
Remove a Member from Organization
USAGE
$ slash-graphql remove-member-from-organization ORGANIZATION MEMBER
ARGUMENTS
ORGANIZATION Organization UID
MEMBER Member Email Address
OPTIONS
-q, --quiet Quiet Output
EXAMPLE
$ slash-graphql remove-organization-member 0x123 member@dgraph.io
See code: src/commands/remove-member-from-organization.ts
slash-graphql restore-backend
Restore into a backend by source backend ID
USAGE
$ slash-graphql restore-backend
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-f, --backupFolder=backupFolder Backup folder retrieved from list-backups. Defaults to ""(latest).
-n, --backupNum=backupNum Backup number retrieved from list-backups. Defaults to 0(latest).
-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> [-f <backup folder> -n <backup number>]
See code: src/commands/restore-backend.ts
slash-graphql restore-backend-status RESTOREID
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
slash-graphql update [CHANNEL]
update the slash-graphql CLI
USAGE
$ slash-graphql update [CHANNEL]
See code: @oclif/plugin-update
slash-graphql update-backend
Update Backend
USAGE
$ slash-graphql update-backend
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-m, --mode=readonly|graphql|flexible Backend Mode
-n, --name=name Name
-o, --organizationId=organizationId Organization UID
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
-y, --confirm Skip Confirmation
EXAMPLE
$ slash-graphql update-backend -e 0xid -n "New Name" -m flexible
See code: src/commands/update-backend.ts
slash-graphql update-lambda
Get the Lambda script associated with the backend.
USAGE
$ slash-graphql update-lambda
OPTIONS
-e, --endpoint=endpoint Slash GraphQL Endpoint
-f, --file=file (required) Lambda script file path.
-q, --quiet Quiet Output
-t, --token=token Slash GraphQL Backend API Tokens
EXAMPLES
$ slash-graphql update-lambda -e https://frozen-mango.cloud.dgraph.io/graphql -f <filepath>
$ slash-graphql update-lambda -e 0x1234 -f /home/user/Downloads/script.js
See code: src/commands/update-lambda.ts
slash-graphql update-schema [FILE]
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