mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 09:51:59 +03:00
1e1a36a192
I'm trying to shore up the Python integration tests to make them more reliable. In doing so, I noticed this. --- Rather than hard-coding hostnames and ports, we can (and already do) inject these into the HGE process using environment variables. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5255 GitOrigin-RevId: 6bb593999ece42cedef6619f31f9d9b2e39f30ef
46 lines
812 B
YAML
46 lines
812 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: "{{ACTION_WEBHOOK_HANDLER}}/get_messages"
|
|
|