remove seed action

This commit is contained in:
Nebel 2022-03-08 14:52:17 +09:00
parent 81af558c81
commit 4fd4b748ad
3 changed files with 0 additions and 19 deletions

View file

@ -6,11 +6,3 @@
headers: headers:
- value: "***" - value: "***"
name: x-hasura-admin-secret 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

View file

@ -5,7 +5,5 @@
query: "query getPage($id: Int!) {\n page: pages_by_pk(id: $id) {\n id\n content\n }\n}" query: "query getPage($id: Int!) {\n page: pages_by_pk(id: $id) {\n id\n content\n }\n}"
- name: put page - 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}" 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 - 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}" 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}"

View file

@ -26,12 +26,3 @@
- PUT - PUT
name: put page name: put page
comment: null comment: null
- definition:
query:
collection_name: allowed-queries
query_name: seed
url: seed_page
methods:
- POST
name: seed
comment: null