Sign up for Hasura Newsletter
Loading...

Hasura CLI

Hasura CLIのインストール

プラットフォームに応じて、ドキュメントの手順に従って Hasura CLIをインストール します。

プロジェクトをローカルで管理するために、Hasura CLIを使用します。空のフォルダで以下のコマンドを実行します。

hasura init

これにより、指定されたディレクトリ(デフォルトでは hasura )の下に新しいプロジェクト構造がローカルで作成されます。ディレクトリ構造は以下の通りです。

├── config.yaml
├── metadata
│   ├── actions.graphql
│   ├── actions.yaml
│   ├── allow_list.yaml
│   ├── cron_triggers.yaml
│   ├── databases
│   │   └── databases.yaml
│   ├── query_collections.yaml
│   ├── remote_schemas.yaml
│   └── version.yaml
├── migrations
└── seeds

migrationsseeds のディレクトリは初期状態では空です。metadata のディレクトリには、アクション、リモートスキーマ、およびプロジェクトに接続されている様々なデータベースや、そのテーブルおよび関数など、GraphQL APIを構成する様々な要素を記述した一連のyamlファイルが格納されています。

docker-compose経由でHasuraをローカルで実行するため、以下のコマンドを実行します

hasura console

これにより、 http://localhost:9695 のコンソールが起動し、 http://localhost:8080 のサーバーコンソールと同じGUIが表示されます。

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin