graphql-engine/server/tests-py/queries/graphql_introspection/remote_relationships/setup.yaml
Samir Talwar b856d96989 server/tests-py: Factor out service URLs as environment variables.
Making it easier to inject different ones later.

I also included a change to _.prettierignore_ so Visual Studio Code doesn't keep trying to reformat the JavaScript or YAML files in `server/tests-py`, as it can cause diffs to balloon for no obvious benefit.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5456
GitOrigin-RevId: bc6d548708160a328e1e61a00e19be8e124da025
2022-08-15 14:59:05 +00:00

45 lines
854 B
YAML

type: bulk
args:
- type: run_sql
args:
sql: |
create schema custom;
create table custom.authors (
id serial primary key,
name text
);
insert into custom.authors (name) values
( 'alice' ),
( 'bob' ),
( 'carlos' ),
( 'david' ),
( 'emily' ),
( 'fiona' );
- type: track_table
args:
schema: custom
name: authors
- type: add_remote_schema
args:
name: my-remote-schema
definition:
url: "{{GRAPHQL_SERVICE_HANDLER}}"
forward_client_headers: false
- type: create_remote_relationship
args:
name: userInfo
table: {schema: custom, name: authors}
hasura_fields:
- id
remote_schema: my-remote-schema
remote_field:
messages:
arguments:
where:
id:
eq: "$id"