From 4fd4b748ad9fed56f4fb5951cefb3ab238462c55 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Tue, 8 Mar 2022 14:52:17 +0900 Subject: [PATCH] remove seed action --- db/metadata/cron_triggers.yaml | 8 -------- db/metadata/query_collections.yaml | 2 -- db/metadata/rest_endpoints.yaml | 9 --------- 3 files changed, 19 deletions(-) diff --git a/db/metadata/cron_triggers.yaml b/db/metadata/cron_triggers.yaml index 41ef4e9..eccf0e7 100644 --- a/db/metadata/cron_triggers.yaml +++ b/db/metadata/cron_triggers.yaml @@ -6,11 +6,3 @@ headers: - value: "***" name: x-hasura-admin-secret -- name: daily_seed - webhook: https://memo-demo.hasura.app/api/rest/seed_page - schedule: 1 0 * * * - include_in_metadata: true - payload: {} - headers: - - value: "***" - name: x-hasura-admin-secret diff --git a/db/metadata/query_collections.yaml b/db/metadata/query_collections.yaml index cffe0fd..a055b07 100644 --- a/db/metadata/query_collections.yaml +++ b/db/metadata/query_collections.yaml @@ -5,7 +5,5 @@ query: "query getPage($id: Int!) {\n page: pages_by_pk(id: $id) {\n id\n content\n }\n}" - name: put page query: "mutation putPage($id: Int, $content: jsonb!) {\n page: insert_pages_one(object: {id: $id, content: $content}, on_conflict: {constraint: pages_pkey, update_columns: content}) {\n id\n content\n }\n}" - - name: seed - query: "mutation seed($scheduled_time: String = \"\", $payload: jsonb = {}, $name: String = \"\", $id: String = \"\") {\n insert_pages_one(object: {id: 1, content: {ops: [{insert: \"メモ帳\\n\", attributes: {header: 1}}, {insert: \"\\nこんにちは!\\nこれは「Hasuraで作るREST API」のデモ用Webアプリです。\\nここに入力した内容は自動的にHasuraに送信されデータベースに保存されます。\\n\\n\"}], scheduled_time: $scheduled_time, payload: $payload, name: $name, id: $id}}) {\n id\n content\n }\n}" - name: delete all query: "mutation deleteAll($scheduled_time: String = \"\", $payload: jsonb = {}, $name: String = \"\", $id: String = \"\") {\n delete_pages(where: {id: {_is_null: false}, _or: {content: {_neq: {scheduled_time: $scheduled_time, payload: $payload, name: $name, id: $id}}}}) {\n affected_rows\n }\n}" diff --git a/db/metadata/rest_endpoints.yaml b/db/metadata/rest_endpoints.yaml index 8214d7c..cbc479b 100644 --- a/db/metadata/rest_endpoints.yaml +++ b/db/metadata/rest_endpoints.yaml @@ -26,12 +26,3 @@ - PUT name: put page comment: null -- definition: - query: - collection_name: allowed-queries - query_name: seed - url: seed_page - methods: - - POST - name: seed - comment: null