graphql-engine/server/tests-py/queries/actions/relationships/basic/setup.yaml
Samir Talwar 1e1a36a192 server/tests-py: Use environment variables for services in queries.
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
2022-08-03 20:05:46 +00:00

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"