Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPLT-1084 Add Hasura CLI config #167

Merged
merged 3 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions hasura/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 3
endpoint: http://localhost:8080
admin_secret: myadminsecretkey
metadata_directory: metadata
actions:
kind: synchronous
handler_webhook_baseurl: http://localhost:3000
Empty file.
6 changes: 6 additions & 0 deletions hasura/metadata/actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
actions: []
custom_types:
enums: []
input_objects: []
objects: []
scalars: []
1 change: 1 addition & 0 deletions hasura/metadata/allow_list.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions hasura/metadata/cron_triggers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
14 changes: 14 additions & 0 deletions hasura/metadata/databases/databases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- name: default
kind: postgres
configuration:
connection_info:
database_url:
from_env: HASURA_GRAPHQL_DATABASE_URL
isolation_level: read-committed
pool_settings:
connection_lifetime: 600
idle_timeout: 180
max_connections: 50
retries: 1
use_prepared_statements: true
tables: "!include default/tables/tables.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
table:
name: indexer_log_entries
schema: public
insert_permissions:
- permission:
check: {}
columns:
- block_height
- function_name
- message
- timestamp
- id
role: append
select_permissions:
- permission:
columns:
- block_height
- function_name
- message
- timestamp
- id
filter: {}
role: append
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
table:
name: indexer_state
schema: public
insert_permissions:
- permission:
check: {}
columns:
- function_name
- current_block_height
- current_historical_block_height
- status
role: append
select_permissions:
- permission:
columns:
- function_name
- current_block_height
- current_historical_block_height
- status
filter: {}
role: append
update_permissions:
- permission:
check: {}
columns:
- function_name
- current_block_height
- current_historical_block_height
- status
filter: {}
role: append
2 changes: 2 additions & 0 deletions hasura/metadata/databases/default/tables/tables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- "!include public_indexer_log_entries.yaml"
- "!include public_indexer_state.yaml"
1 change: 1 addition & 0 deletions hasura/metadata/query_collections.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions hasura/metadata/remote_schemas.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions hasura/metadata/rest_endpoints.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions hasura/metadata/version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version: 3
2 changes: 2 additions & 0 deletions hasura/migrations/default/1691364619300_init/down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP TABLE public.indexer_log_entries;
DROP TABLE public.indexer_state;
18 changes: 18 additions & 0 deletions hasura/migrations/default/1691364619300_init/up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
SET check_function_bodies = false;
CREATE TABLE public.indexer_log_entries (
id uuid DEFAULT gen_random_uuid() NOT NULL,
function_name text NOT NULL,
block_height numeric NOT NULL,
"timestamp" timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
message text
);
CREATE TABLE public.indexer_state (
function_name character varying NOT NULL,
current_block_height numeric(21,0) NOT NULL,
status text,
current_historical_block_height numeric(21,0)
);
ALTER TABLE ONLY public.indexer_log_entries
ADD CONSTRAINT indexer_log_entries_pkey PRIMARY KEY (id);
ALTER TABLE ONLY public.indexer_state
ADD CONSTRAINT indexer_state_pkey PRIMARY KEY (function_name);