mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-19 13:31:43 +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
89 lines
1.5 KiB
YAML
89 lines
1.5 KiB
YAML
type: bulk
|
|
args:
|
|
- type: pg_track_table
|
|
args:
|
|
table: user
|
|
|
|
- type: pg_track_table
|
|
args:
|
|
table: article
|
|
|
|
- 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
|
|
- name: articles
|
|
type: array
|
|
remote_table: article
|
|
field_mapping:
|
|
id: user_id
|
|
|
|
- type: create_action
|
|
args:
|
|
name: create_user
|
|
definition:
|
|
kind: synchronous
|
|
arguments:
|
|
- name: email
|
|
type: String!
|
|
- name: name
|
|
type: String!
|
|
output_type: UserId
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/create-user"
|
|
|
|
- type: create_action_permission
|
|
args:
|
|
action: create_user
|
|
role: role1
|
|
|
|
- type: create_action_permission
|
|
args:
|
|
action: create_user
|
|
role: role2
|
|
|
|
- type: pg_create_select_permission
|
|
args:
|
|
table: article
|
|
role: role3
|
|
permission:
|
|
columns:
|
|
- name
|
|
- user_id
|
|
filter:
|
|
user_id: "X-Hasura-User-Id"
|
|
|
|
- type: pg_create_select_permission
|
|
args:
|
|
table: article
|
|
role: role4
|
|
permission:
|
|
columns:
|
|
- name
|
|
- user_id
|
|
filter:
|
|
user_id: "X-Hasura-User-Id"
|
|
|
|
- type: add_inherited_role
|
|
args:
|
|
role_name: inherited_role1
|
|
role_set:
|
|
- role1
|
|
- role2
|
|
- role3
|
|
|
|
- type: add_inherited_role
|
|
args:
|
|
role_name: inherited_role2
|
|
role_set:
|
|
- role3
|
|
- role4
|