mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 18:42:30 +03:00
b856d96989
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
45 lines
854 B
YAML
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"
|