Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Joins: Create relationships across database and remote schemas (w/ console) #2395

Draft
wants to merge 196 commits into
base: master
from

Conversation

@wawhal
Copy link
Contributor

commented Jun 18, 2019

Description

Remote Joins will ensure independent and related types in Remote Schemas can be joined natively via Hasura.

Remote joins will work similar to table relationships. You can define a relationship by giving:

  • a name for the relationship
  • a join configuration from table fields to remote schema fields.

Affected components

  • Server
  • Console
  • Docs
  • Build System
  • Tests

Related Issues

#1225
#1846
#2461

Remaining steps:

  • Pass all tests
  • Change tests for breaking changes
  • Field level permissions
  • Add joining logic in websocket protocol
  • Update test dependencies in circleCI
  • Docs
  • Console (happening in #2395 )
  • Concurrency changes
  • Change error handling to collect all errors
  • Breaking support for remote interfaces and union types
  • Change query caching logic for concurrent executions
  • Run benchmarks

Steps to test and verify

The latest preview is available at https://hge-ci-pull-2395.herokuapp.com/
Docker image: Find the latest comment by hasura-bot below.

Limitations, known bugs & workarounds

  • Transactions will not work for concurrent execution.
  • Enum types are not supported for JOIN columns

chrisdone and others added some commits Jun 3, 2019

Merge pull request #10 from chrisdone/insert-remote-relationships-and…
…-validation

Insert remote relationships and validation
Merge pull request #13 from tirumaraiselvan/update_remote_schema_test…
…_infra

add node graphql test server
Merge pull request #11 from tirumaraiselvan/validate_object_types
implement list and object validations (close #9)

wawhal and others added some commits Jun 17, 2019

cache introspection for remote schema, add version checks (#7)
* render 404 for nonexistent resources (#2341)

* update console dev logging + add logging disable instructions to README (#2388)

* update table rename handling (#2393)

* suggest column default values (#2352)

* fix postgres query to fetch pg_types default functions (close #2399) (#2402)

* add graphql-voyager to console (close #314) (#2369)

* clear header state for remote-schema (close #2396) (#2401)

* change browse rows action buttons heading id (close #2403) (#2413)

* created docker compose for build and launch of tutorial (#2406)

* fix renaming of columns used in insert permission (fix #2398) (#2414)

* graphql2chartjs: fix mapping of non-array types (#2307)

* add name of ci environment to telemetry data (#2382)

* learn: update react native tutorial with videos (#2390)

* create down migration when a column is dropped (close #2291) (#2385)

* add new column row during add table only after completed prev column def (#2428)

* add a make rule to build server docker image locally (#2410)

* learn: fix twitter share image on homepage (#2437)

* add note on exporting multiple schemas as migration (#2436)

* fix browse rows query error handling + boolean filter value (close #2421) (#2440)

* graphql2chartjs: bump version to 0.3.0 (#2445)

* fix to show error notification when run sql fails in cli mode (close #2438) (#2446)

* freeze requirements.txt for server tests (#2450)

* update postgres permission documentation (fix #2404) (#2405)

* refactor AddTable validation on console (close #1712) (#2408)

* change default type placeholder from 'text' to type (fix 2394) (#2458)

* add server version to console html (close #2444) (#2452)

* fix type placeholders in console insert/edit row (#2460)

* fix relationship page error if array fk relationship exists with table in another schema (#2459)

* infer relationship type using uniqueness constraint of foreign key (close #969) (#2347)

* use server version from console html (#2464)

* add schema explorer ui

* wire up create API, WIP

* ui fixes

* integrate with proxy API

* fetch remote relationships in loadSchema

* fixes

* finish up UI for remote rels; waiting on edit API

* break relationships ui into sections

* move graphql schema to local state

* update relationship label

* restructure

* update styles; add tooltips

* filter out fields (scalar type || wrapped scalar type) and do accept any args

* remove an unnecessary log

* version check init

* add version check for remote relationship on loadSchema

* use FT_REMOTE_RELATIONSHIPS

* allow adding string values for scalar args

* comment code

* add update relationship feature

* cover edge cases for update remote rel

* fix semver issue where sometimes the query would never be called

* remove unnecessary fields from schema tree

* stable

* wip

* wip

* wip

* add version checks

* invalidate remote schema cache appropriately

* Remove unnecessary logs

@wawhal wawhal force-pushed the wawhal:issue-188 branch from f5fa73f to 26d471c Jul 24, 2019

@hasura-bot

This comment has been minimized.

Copy link

commented Jul 24, 2019

Review app for commit 26d471c deployed to Heroku: https://hge-ci-pull-2395.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2395-26d471c7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.