From 13a8b25037a1d903afd79c6d450c518dc2c76b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E6=B5=A6=20=E7=BF=BC?= Date: Tue, 30 May 2023 01:09:12 +0900 Subject: [PATCH] [add] hasura metadata export (#196) --- hasura/metadata/actions.yaml | 8 ++++---- hasura/metadata/api_limits.yaml | 1 + hasura/metadata/backend_configs.yaml | 1 + hasura/metadata/databases/databases.yaml | 15 ++++++++++++++- .../default/tables/public_bureaus.yaml | 3 +++ .../default/tables/public_categories.yaml | 3 +++ .../default/tables/public_chapters.yaml | 3 +++ .../tables/public_curriculum_skills.yaml | 3 +++ .../default/tables/public_curriculums.yaml | 3 +++ .../default/tables/public_departments.yaml | 3 +++ .../default/tables/public_grades.yaml | 3 +++ .../default/tables/public_project_skills.yaml | 3 +++ .../default/tables/public_project_users.yaml | 3 +++ .../default/tables/public_projects.yaml | 3 +++ .../default/tables/public_records.yaml | 3 +++ .../databases/default/tables/public_roles.yaml | 3 +++ .../default/tables/public_skills.yaml | 3 +++ .../default/tables/public_teachers.yaml | 3 +++ .../databases/default/tables/public_types.yaml | 3 +++ .../default/tables/public_user_details.yaml | 3 +++ .../default/tables/public_user_skills.yaml | 3 +++ .../databases/default/tables/public_users.yaml | 3 +++ .../databases/default/tables/tables.yaml | 18 ++++++++++++++++++ .../metadata/graphql_schema_introspection.yaml | 1 + hasura/metadata/inherited_roles.yaml | 1 + hasura/metadata/metrics_config.yaml | 1 + hasura/metadata/network.yaml | 1 + hasura/metadata/opentelemetry.yaml | 1 + hasura/metadata/rest_endpoints.yaml | 1 + 29 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 hasura/metadata/api_limits.yaml create mode 100644 hasura/metadata/backend_configs.yaml create mode 100644 hasura/metadata/databases/default/tables/public_bureaus.yaml create mode 100644 hasura/metadata/databases/default/tables/public_categories.yaml create mode 100644 hasura/metadata/databases/default/tables/public_chapters.yaml create mode 100644 hasura/metadata/databases/default/tables/public_curriculum_skills.yaml create mode 100644 hasura/metadata/databases/default/tables/public_curriculums.yaml create mode 100644 hasura/metadata/databases/default/tables/public_departments.yaml create mode 100644 hasura/metadata/databases/default/tables/public_grades.yaml create mode 100644 hasura/metadata/databases/default/tables/public_project_skills.yaml create mode 100644 hasura/metadata/databases/default/tables/public_project_users.yaml create mode 100644 hasura/metadata/databases/default/tables/public_projects.yaml create mode 100644 hasura/metadata/databases/default/tables/public_records.yaml create mode 100644 hasura/metadata/databases/default/tables/public_roles.yaml create mode 100644 hasura/metadata/databases/default/tables/public_skills.yaml create mode 100644 hasura/metadata/databases/default/tables/public_teachers.yaml create mode 100644 hasura/metadata/databases/default/tables/public_types.yaml create mode 100644 hasura/metadata/databases/default/tables/public_user_details.yaml create mode 100644 hasura/metadata/databases/default/tables/public_user_skills.yaml create mode 100644 hasura/metadata/databases/default/tables/public_users.yaml create mode 100644 hasura/metadata/databases/default/tables/tables.yaml create mode 100644 hasura/metadata/graphql_schema_introspection.yaml create mode 100644 hasura/metadata/inherited_roles.yaml create mode 100644 hasura/metadata/metrics_config.yaml create mode 100644 hasura/metadata/network.yaml create mode 100644 hasura/metadata/opentelemetry.yaml create mode 100644 hasura/metadata/rest_endpoints.yaml diff --git a/hasura/metadata/actions.yaml b/hasura/metadata/actions.yaml index 1979211..1edb4c2 100644 --- a/hasura/metadata/actions.yaml +++ b/hasura/metadata/actions.yaml @@ -1,6 +1,6 @@ actions: [] custom_types: - enums: [] - input_objects: [] - objects: [] - scalars: [] + enums: [] + input_objects: [] + objects: [] + scalars: [] diff --git a/hasura/metadata/api_limits.yaml b/hasura/metadata/api_limits.yaml new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/hasura/metadata/api_limits.yaml @@ -0,0 +1 @@ +{} diff --git a/hasura/metadata/backend_configs.yaml b/hasura/metadata/backend_configs.yaml new file mode 100644 index 0000000..47b48f7 --- /dev/null +++ b/hasura/metadata/backend_configs.yaml @@ -0,0 +1 @@ +dataconnector: {} diff --git a/hasura/metadata/databases/databases.yaml b/hasura/metadata/databases/databases.yaml index fe51488..65a11b2 100644 --- a/hasura/metadata/databases/databases.yaml +++ b/hasura/metadata/databases/databases.yaml @@ -1 +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" diff --git a/hasura/metadata/databases/default/tables/public_bureaus.yaml b/hasura/metadata/databases/default/tables/public_bureaus.yaml new file mode 100644 index 0000000..ea336b9 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_bureaus.yaml @@ -0,0 +1,3 @@ +table: + name: bureaus + schema: public diff --git a/hasura/metadata/databases/default/tables/public_categories.yaml b/hasura/metadata/databases/default/tables/public_categories.yaml new file mode 100644 index 0000000..9b2afe9 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_categories.yaml @@ -0,0 +1,3 @@ +table: + name: categories + schema: public diff --git a/hasura/metadata/databases/default/tables/public_chapters.yaml b/hasura/metadata/databases/default/tables/public_chapters.yaml new file mode 100644 index 0000000..de6d082 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_chapters.yaml @@ -0,0 +1,3 @@ +table: + name: chapters + schema: public diff --git a/hasura/metadata/databases/default/tables/public_curriculum_skills.yaml b/hasura/metadata/databases/default/tables/public_curriculum_skills.yaml new file mode 100644 index 0000000..6ba5a84 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_curriculum_skills.yaml @@ -0,0 +1,3 @@ +table: + name: curriculum_skills + schema: public diff --git a/hasura/metadata/databases/default/tables/public_curriculums.yaml b/hasura/metadata/databases/default/tables/public_curriculums.yaml new file mode 100644 index 0000000..04ec991 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_curriculums.yaml @@ -0,0 +1,3 @@ +table: + name: curriculums + schema: public diff --git a/hasura/metadata/databases/default/tables/public_departments.yaml b/hasura/metadata/databases/default/tables/public_departments.yaml new file mode 100644 index 0000000..12a7bdd --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_departments.yaml @@ -0,0 +1,3 @@ +table: + name: departments + schema: public diff --git a/hasura/metadata/databases/default/tables/public_grades.yaml b/hasura/metadata/databases/default/tables/public_grades.yaml new file mode 100644 index 0000000..11c9b0e --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_grades.yaml @@ -0,0 +1,3 @@ +table: + name: grades + schema: public diff --git a/hasura/metadata/databases/default/tables/public_project_skills.yaml b/hasura/metadata/databases/default/tables/public_project_skills.yaml new file mode 100644 index 0000000..37db0b1 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_project_skills.yaml @@ -0,0 +1,3 @@ +table: + name: project_skills + schema: public diff --git a/hasura/metadata/databases/default/tables/public_project_users.yaml b/hasura/metadata/databases/default/tables/public_project_users.yaml new file mode 100644 index 0000000..b26f1e2 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_project_users.yaml @@ -0,0 +1,3 @@ +table: + name: project_users + schema: public diff --git a/hasura/metadata/databases/default/tables/public_projects.yaml b/hasura/metadata/databases/default/tables/public_projects.yaml new file mode 100644 index 0000000..a1fcae4 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_projects.yaml @@ -0,0 +1,3 @@ +table: + name: projects + schema: public diff --git a/hasura/metadata/databases/default/tables/public_records.yaml b/hasura/metadata/databases/default/tables/public_records.yaml new file mode 100644 index 0000000..5c5285c --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_records.yaml @@ -0,0 +1,3 @@ +table: + name: records + schema: public diff --git a/hasura/metadata/databases/default/tables/public_roles.yaml b/hasura/metadata/databases/default/tables/public_roles.yaml new file mode 100644 index 0000000..c2e0c5b --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_roles.yaml @@ -0,0 +1,3 @@ +table: + name: roles + schema: public diff --git a/hasura/metadata/databases/default/tables/public_skills.yaml b/hasura/metadata/databases/default/tables/public_skills.yaml new file mode 100644 index 0000000..92e08c9 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_skills.yaml @@ -0,0 +1,3 @@ +table: + name: skills + schema: public diff --git a/hasura/metadata/databases/default/tables/public_teachers.yaml b/hasura/metadata/databases/default/tables/public_teachers.yaml new file mode 100644 index 0000000..b19c55a --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_teachers.yaml @@ -0,0 +1,3 @@ +table: + name: teachers + schema: public diff --git a/hasura/metadata/databases/default/tables/public_types.yaml b/hasura/metadata/databases/default/tables/public_types.yaml new file mode 100644 index 0000000..6cab40e --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_types.yaml @@ -0,0 +1,3 @@ +table: + name: types + schema: public diff --git a/hasura/metadata/databases/default/tables/public_user_details.yaml b/hasura/metadata/databases/default/tables/public_user_details.yaml new file mode 100644 index 0000000..3f0f243 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_user_details.yaml @@ -0,0 +1,3 @@ +table: + name: user_details + schema: public diff --git a/hasura/metadata/databases/default/tables/public_user_skills.yaml b/hasura/metadata/databases/default/tables/public_user_skills.yaml new file mode 100644 index 0000000..db0987d --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_user_skills.yaml @@ -0,0 +1,3 @@ +table: + name: user_skills + schema: public diff --git a/hasura/metadata/databases/default/tables/public_users.yaml b/hasura/metadata/databases/default/tables/public_users.yaml new file mode 100644 index 0000000..52de1e0 --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_users.yaml @@ -0,0 +1,3 @@ +table: + name: users + schema: public diff --git a/hasura/metadata/databases/default/tables/tables.yaml b/hasura/metadata/databases/default/tables/tables.yaml new file mode 100644 index 0000000..aa0105e --- /dev/null +++ b/hasura/metadata/databases/default/tables/tables.yaml @@ -0,0 +1,18 @@ +- "!include public_bureaus.yaml" +- "!include public_categories.yaml" +- "!include public_chapters.yaml" +- "!include public_curriculum_skills.yaml" +- "!include public_curriculums.yaml" +- "!include public_departments.yaml" +- "!include public_grades.yaml" +- "!include public_project_skills.yaml" +- "!include public_project_users.yaml" +- "!include public_projects.yaml" +- "!include public_records.yaml" +- "!include public_roles.yaml" +- "!include public_skills.yaml" +- "!include public_teachers.yaml" +- "!include public_types.yaml" +- "!include public_user_details.yaml" +- "!include public_user_skills.yaml" +- "!include public_users.yaml" diff --git a/hasura/metadata/graphql_schema_introspection.yaml b/hasura/metadata/graphql_schema_introspection.yaml new file mode 100644 index 0000000..61a4dca --- /dev/null +++ b/hasura/metadata/graphql_schema_introspection.yaml @@ -0,0 +1 @@ +disabled_for_roles: [] diff --git a/hasura/metadata/inherited_roles.yaml b/hasura/metadata/inherited_roles.yaml new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/hasura/metadata/inherited_roles.yaml @@ -0,0 +1 @@ +[] diff --git a/hasura/metadata/metrics_config.yaml b/hasura/metadata/metrics_config.yaml new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/hasura/metadata/metrics_config.yaml @@ -0,0 +1 @@ +{} diff --git a/hasura/metadata/network.yaml b/hasura/metadata/network.yaml new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/hasura/metadata/network.yaml @@ -0,0 +1 @@ +{} diff --git a/hasura/metadata/opentelemetry.yaml b/hasura/metadata/opentelemetry.yaml new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/hasura/metadata/opentelemetry.yaml @@ -0,0 +1 @@ +{} diff --git a/hasura/metadata/rest_endpoints.yaml b/hasura/metadata/rest_endpoints.yaml new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/hasura/metadata/rest_endpoints.yaml @@ -0,0 +1 @@ +[]