graphql-engine/server/tests-py/queries/graphql_mutation/insert/permissions/values_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

53 lines
929 B
YAML

type: bulk
args:
#Insert Author table data
- type: insert
args:
table: author
objects:
- name: Author 1
- name: Author 2
#Insert aticle table data
- type: insert
args:
table: article
objects:
- content: Sample article content
title: Article 1
author_id: 1
- content: Sample article content
title: Article 2
author_id: 1
- content: Sample article content
title: Article 3
author_id: 2
#Create blog table
#Insert Author table data
- type: run_sql
args:
sql: |
INSERT INTO blog (id, title, author_id) VALUES
(1, 'first blog', 1), (2, 'second blog', 2);
insert into "user" (name, is_admin)
values ('user_1', false), ('user_2', true)
;
- type: insert
args:
table: resident
objects:
- id: 5
name: Resident 5
age: 21
- id: 6
name: Resident 6
age: 22
#Insert users