mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-19 13:31:43 +03:00
d5e46b6041
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4486 Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com> Co-authored-by: Brandon Simmons <210815+jberryman@users.noreply.github.com> GitOrigin-RevId: 35bb05f9a3c98689c05f2865e0923c00b46e5419
46 lines
833 B
YAML
46 lines
833 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: "{{ACTION_WEBHOOK_HANDLER}}/create-user-timeout"
|