graphql-engine/cli
Aravind Shankar 325771e406
cli: remove migration files if api returns error (close #4312) (#4319)
When using console from CLI and a migration is created, the files are written first and an API call is made to Hasura to execute that migration. There was a bug which caused this file to remain when the API call to Hasura failed. This commit fixes the bug by deleting the files if Hasura API call fails and propagates the error to console.
2020-04-08 10:54:47 +05:30
..
build [cli] add docs and build tools (#3) 2018-06-28 11:10:18 +05:30
cmd/hasura fix typos is multiple files (#728) 2018-10-15 12:29:51 +05:30
commands cli: add support for multiple versions of plugin (close #4105) (#4135) 2020-04-07 19:42:14 +05:30
integration_test cli: fix init command to generate correct config (fix #4036) (#4038) 2020-03-26 08:54:05 +05:30
metadata cli: add support for multiple versions of plugin (close #4105) (#4135) 2020-04-07 19:42:14 +05:30
migrate cli: remove migration files if api returns error (close #4312) (#4319) 2020-04-08 10:54:47 +05:30
pkg/console cli: refactor console command (#4150) 2020-04-07 14:53:20 +05:30
plugins cli: add support for multiple versions of plugin (close #4105) (#4135) 2020-04-07 19:42:14 +05:30
telemetry cli: add directory name as an argument to init cmd (#3590) 2019-12-25 14:01:29 +05:30
update cli: add version flag in update-cli command (#3996) 2020-03-05 12:25:33 +05:30
util cli: add support for multiple versions of plugin (close #4105) (#4135) 2020-04-07 19:42:14 +05:30
version cli: refactor console command (#4150) 2020-04-07 14:53:20 +05:30
.gitignore [cli] commit realize, update docs 2018-06-28 11:35:34 +05:30
.realize.yaml cli: update go-binddata, fix realize (close #3588) (#3687) 2020-01-13 15:24:41 +05:30
cli.go cli: fix init command to generate correct config (fix #4036) (#4038) 2020-03-26 08:54:05 +05:30
CONTRIBUTING.md docs: use install manifests from stable branch (#3906) 2020-02-19 17:13:08 +05:30
directory.go cli: allow managing actions (#3859) 2020-02-24 21:44:46 +05:30
get.sh cli(installer): add -f flag to curl (fix #1871) (#3477) 2019-12-12 11:00:19 +05:30
global_config.go rename access-key to admin-secret (close #1347) (#1540) 2019-02-14 15:07:47 +05:30
go.mod cli: add support for multiple versions of plugin (close #4105) (#4135) 2020-04-07 19:42:14 +05:30
go.sum cli: refactor console command (#4150) 2020-04-07 14:53:20 +05:30
logger_hook.go cli: allow managing actions (#3859) 2020-02-24 21:44:46 +05:30
Makefile cli: update makefile to include pkger (#4320) 2020-04-07 18:35:00 +05:30
README.md cli: update installation instructions in the readme (fix #3875) (#3876) 2020-02-13 12:54:36 +05:30

Hasura GraphQL Engine CLI

GoDoc

Installation

Download GraphQL Engine CLI bundled with Hasura CLI

  • Linux/macOS
curl -L https://github.com/hasura/graphql-engine/raw/master/cli/get.sh | bash
  • Windows

Download the binary cli-hasura-windows-amd64.exe available under Assets of the latest release from the GitHub release page: https://github.com/hasura/graphql-engine/releases

Download using go get

go get github.com/hasura/graphql-engine/cli/cmd/hasura

Build from source

git clone https://github.com/hasura/graphql-engine
cd graphql-engine/cli
make deps
make build
# binaries will be in _output directory

Usage

hasura init --directory <my-project> --endpoint <graphql-endpoint> --admin-secret <admin-secret>
cd <my-project>
hasura console

Contributing

Checkout the contributing guide.