mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 21:12:09 +03:00
35 lines
574 B
YAML
35 lines
574 B
YAML
|
type: bulk
|
||
|
args:
|
||
|
|
||
|
- type: run_sql
|
||
|
args:
|
||
|
sql: |
|
||
|
CREATE TABLE users (
|
||
|
id SERIAL PRIMARY KEY,
|
||
|
name TEXT
|
||
|
);
|
||
|
INSERT INTO users VALUES (1, 'alice');
|
||
|
INSERT INTO users VALUES (2, 'bob');
|
||
|
|
||
|
- type: track_table
|
||
|
args:
|
||
|
schema: public
|
||
|
name: users
|
||
|
|
||
|
- type: create_select_permission
|
||
|
args:
|
||
|
table: users
|
||
|
role: user
|
||
|
permission:
|
||
|
columns: '*'
|
||
|
filter:
|
||
|
id: X-Hasura-User-Id
|
||
|
|
||
|
- type: create_insert_permission
|
||
|
args:
|
||
|
table: users
|
||
|
role: user
|
||
|
permission:
|
||
|
check:
|
||
|
id: X-Hasura-User-Id
|