graphql-engine/server/tests-py/queries/actions/timeout/schema_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

46 lines
826 B
YAML

type: bulk
args:
- type: run_sql
args:
sql: |
CREATE TABLE "user"(
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
email TEXT NOT NULL,
is_admin BOOLEAN NOT NULL DEFAULT false
);
- type: track_table
args:
name: user
schema: public
- type: set_custom_types
args:
objects:
- name: UserId
fields:
- name: id
type: Int!
relationships:
- name: user
type: object
remote_table: user
field_mapping:
id: id
- type: create_action
args:
name: create_user
definition:
kind: asynchronous
arguments:
- name: email
type: String!
- name: name
type: String!
output_type: UserId
timeout: 2
handler: http://127.0.0.1:5593/create-user-timeout