graphql-engine/server/tests-py/queries/subscriptions/multiplexing/setup.yaml
Swann Moreau 5bc0355bdd [server] coalesce multiple run_sql calls in tests (#270)
GitOrigin-RevId: abd7303aaf8e7a8739fd10574249aec450082ef8
2021-01-06 16:07:22 +00:00

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