mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 01:44:03 +03:00
5bc0355bdd
GitOrigin-RevId: abd7303aaf8e7a8739fd10574249aec450082ef8
47 lines
803 B
YAML
47 lines
803 B
YAML
type: bulk
|
|
args:
|
|
|
|
- type: run_sql
|
|
args:
|
|
sql: |
|
|
CREATE TABLE test(id serial PRIMARY KEY);
|
|
create table articles(
|
|
id serial primary key,
|
|
user_id int,
|
|
content text,
|
|
title text,
|
|
is_public bool default false
|
|
);
|
|
|
|
- type: track_table
|
|
args:
|
|
name: test
|
|
- type: track_table
|
|
args:
|
|
name: articles
|
|
- type: create_select_permission
|
|
args:
|
|
table:
|
|
name: articles
|
|
role: public
|
|
permission:
|
|
columns:
|
|
- title
|
|
- content
|
|
filter:
|
|
is_public: true
|
|
- type: create_select_permission
|
|
args:
|
|
table:
|
|
name: articles
|
|
role: user
|
|
permission:
|
|
columns:
|
|
- user_id
|
|
- title
|
|
- content
|
|
- is_public
|
|
filter:
|
|
id:
|
|
_eq: X-Hasura-User-Id
|