mirror of
https://github.com/kou029w/hasura-rest-hands-on.git
synced 2025-01-18 08:05:12 +00:00
delete metadata
This commit is contained in:
parent
60a80caca7
commit
f945065b01
12 changed files with 0 additions and 114 deletions
|
@ -1,3 +0,0 @@
|
||||||
# [memo-demo.hasura.app](https://memo-demo.hasura.app)
|
|
||||||
|
|
||||||
https://cloud.hasura.io → "Git Deployment"
|
|
|
@ -1,6 +0,0 @@
|
||||||
version: 3
|
|
||||||
endpoint: https://memo-demo.hasura.app
|
|
||||||
metadata_directory: metadata
|
|
||||||
actions:
|
|
||||||
kind: synchronous
|
|
||||||
handler_webhook_baseurl: http://localhost:3000
|
|
|
@ -1,6 +0,0 @@
|
||||||
actions: []
|
|
||||||
custom_types:
|
|
||||||
enums: []
|
|
||||||
input_objects: []
|
|
||||||
objects: []
|
|
||||||
scalars: []
|
|
|
@ -1 +0,0 @@
|
||||||
- collection: allowed-queries
|
|
|
@ -1,8 +0,0 @@
|
||||||
- name: daily_reset
|
|
||||||
webhook: https://memo-demo.hasura.app/api/rest/delete_pages
|
|
||||||
schedule: 0 0 * * *
|
|
||||||
include_in_metadata: true
|
|
||||||
payload: {}
|
|
||||||
headers:
|
|
||||||
- value: "***"
|
|
||||||
name: x-hasura-admin-secret
|
|
|
@ -1,35 +0,0 @@
|
||||||
- name: default
|
|
||||||
kind: postgres
|
|
||||||
tables:
|
|
||||||
- table:
|
|
||||||
schema: public
|
|
||||||
name: pages
|
|
||||||
insert_permissions:
|
|
||||||
- role: anonymous
|
|
||||||
permission:
|
|
||||||
check: {}
|
|
||||||
columns:
|
|
||||||
- id
|
|
||||||
- content
|
|
||||||
backend_only: false
|
|
||||||
select_permissions:
|
|
||||||
- role: anonymous
|
|
||||||
permission:
|
|
||||||
columns:
|
|
||||||
- id
|
|
||||||
- content
|
|
||||||
filter: {}
|
|
||||||
update_permissions:
|
|
||||||
- role: anonymous
|
|
||||||
permission:
|
|
||||||
columns:
|
|
||||||
- id
|
|
||||||
- content
|
|
||||||
filter: {}
|
|
||||||
check: {}
|
|
||||||
configuration:
|
|
||||||
connection_info:
|
|
||||||
use_prepared_statements: false
|
|
||||||
database_url:
|
|
||||||
from_env: HEROKU_DATABASE_URL
|
|
||||||
isolation_level: read-committed
|
|
|
@ -1,9 +0,0 @@
|
||||||
- name: allowed-queries
|
|
||||||
definition:
|
|
||||||
queries:
|
|
||||||
- name: get page
|
|
||||||
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: 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}"
|
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
|
@ -1,28 +0,0 @@
|
||||||
- definition:
|
|
||||||
query:
|
|
||||||
collection_name: allowed-queries
|
|
||||||
query_name: delete all
|
|
||||||
url: delete_pages
|
|
||||||
methods:
|
|
||||||
- POST
|
|
||||||
- DELETE
|
|
||||||
name: delete all
|
|
||||||
comment: null
|
|
||||||
- definition:
|
|
||||||
query:
|
|
||||||
collection_name: allowed-queries
|
|
||||||
query_name: get page
|
|
||||||
url: page/:id
|
|
||||||
methods:
|
|
||||||
- GET
|
|
||||||
name: get page
|
|
||||||
comment: null
|
|
||||||
- definition:
|
|
||||||
query:
|
|
||||||
collection_name: allowed-queries
|
|
||||||
query_name: put page
|
|
||||||
url: page/:id
|
|
||||||
methods:
|
|
||||||
- PUT
|
|
||||||
name: put page
|
|
||||||
comment: null
|
|
|
@ -1 +0,0 @@
|
||||||
version: 3
|
|
|
@ -1,16 +0,0 @@
|
||||||
SET check_function_bodies = false;
|
|
||||||
CREATE TABLE public.pages (
|
|
||||||
id integer NOT NULL,
|
|
||||||
content jsonb NOT NULL
|
|
||||||
);
|
|
||||||
CREATE SEQUENCE public.pages_id_seq
|
|
||||||
AS integer
|
|
||||||
START WITH 1
|
|
||||||
INCREMENT BY 1
|
|
||||||
NO MINVALUE
|
|
||||||
NO MAXVALUE
|
|
||||||
CACHE 1;
|
|
||||||
ALTER SEQUENCE public.pages_id_seq OWNED BY public.pages.id;
|
|
||||||
ALTER TABLE ONLY public.pages ALTER COLUMN id SET DEFAULT nextval('public.pages_id_seq'::regclass);
|
|
||||||
ALTER TABLE ONLY public.pages
|
|
||||||
ADD CONSTRAINT pages_pkey PRIMARY KEY (id);
|
|
Loading…
Add table
Reference in a new issue