graphql-engine/server/tests-py/queries/remote_schemas/remote_relationships/setup.yaml
hasura-bot 8eebcb9bdf server: query remote server in a remote join query iff all arguments are not null (#31)
* server: query remote server in a remote join query iff all arguments are not null

Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
GITHUB_PR_NUMBER: 6199
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6199

* Update server/src-lib/Hasura/Backends/Postgres/Execute/RemoteJoin.hs

Co-authored-by: Brandon Simmons <brandon@hasura.io>

* Apply suggestions from code review

Co-authored-by: Brandon Simmons <brandon@hasura.io>

* Update server/tests-py/test_remote_relationships.py

Co-authored-by: Brandon Simmons <brandon@hasura.io>

* Apply suggestions from code review

Co-authored-by: Brandon Simmons <brandon@hasura.io>

* use guard instead of case match

* add comment about the remote relationship joining

* add a comment about the design discussion

* update CHANGELOG

Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
Co-authored-by: Brandon Simmons <brandon@hasura.io>
GitOrigin-RevId: ce7e8288d37ad7c32705f96cb6363f6ad68f3c0a
2020-11-18 09:00:12 +00:00

69 lines
1.0 KiB
YAML

type: bulk
args:
# To model this:
# query {
# profiles {
# id
# message {
# id
# msg
# }
# }
# }
#Profile table
- type: run_sql
args:
sql: |
create table profiles (
id serial primary key,
name text
);
- type: run_sql
args:
sql: |
insert into profiles (name) values
( 'alice' ),
( 'bob' ),
( 'alice')
- type: track_table
args:
schema: public
name: profiles
- type: add_remote_schema
args:
name: my-remote-schema
definition:
url: http://localhost:4000
forward_client_headers: false
- type: run_sql
args:
sql: |
create table authors (
id serial primary key,
name text
);
- type: track_table
args:
schema: public
name: authors
- type: run_sql
args:
sql: |
create table employees (
id serial primary key,
name text
);
insert into employees (name) values ('alice'),(NULL),('bob');
- type: track_table
args:
schema: public
name: employees