mirror of
https://github.com/kou029w/hasura-rest-hands-on.git
synced 2025-01-18 08:05:12 +00:00
remove seed action
This commit is contained in:
parent
81af558c81
commit
4fd4b748ad
3 changed files with 0 additions and 19 deletions
|
@ -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
|
|
||||||
|
|
|
@ -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}"
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue