mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-22 15:01:39 +03:00
1ca0cb9c74
Fixes: https://github.com/hasura/graphql-engine/issues/8399. See [this comment](https://github.com/hasura/graphql-engine-mono/pull/4297/files#r853259983) for an explanation. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4297 Co-authored-by: Brandon Martin <40686+codedmart@users.noreply.github.com> GitOrigin-RevId: accc85a77cb108224b1c78da709dc96d0e4e298d
46 lines
805 B
YAML
46 lines
805 B
YAML
type: bulk
|
|
args:
|
|
|
|
- type: run_sql
|
|
args:
|
|
sql: |
|
|
CREATE TABLE "user"(
|
|
id SERIAL PRIMARY KEY,
|
|
name TEXT NOT NULL
|
|
);
|
|
INSERT INTO "user" (name) VALUES
|
|
('foo'),
|
|
('bar');
|
|
|
|
- type: track_table
|
|
args:
|
|
name: user
|
|
schema: public
|
|
|
|
- type: set_custom_types
|
|
args:
|
|
objects:
|
|
- name: Message
|
|
fields:
|
|
- name: content
|
|
type: String!
|
|
- name: user_name
|
|
type: String!
|
|
relationships:
|
|
- name: user
|
|
type: object
|
|
remote_table: user
|
|
field_mapping:
|
|
user_name: name
|
|
|
|
- type: create_action
|
|
args:
|
|
name: get_messages
|
|
definition:
|
|
kind: synchronous
|
|
type: query
|
|
arguments: []
|
|
output_type: "[Message]"
|
|
handler: http://127.0.0.1:5593/get_messages
|
|
|