mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-21 06:21:39 +03:00
0e6e9deac9
https://github.com/hasura/graphql-engine-mono/pull/1606 Co-authored-by: Chris Done <11019+chrisdone@users.noreply.github.com> Co-authored-by: Aniket Deshpande <922486+aniketd@users.noreply.github.com> Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com> GitOrigin-RevId: 2ed37c48c5d1e82e23d691f30a6e870303787388
69 lines
1.2 KiB
YAML
69 lines
1.2 KiB
YAML
type: bulk
|
|
args:
|
|
|
|
# track tables
|
|
|
|
- type: mysql_track_table
|
|
args:
|
|
source: mysql
|
|
table:
|
|
name: author
|
|
schema: hasura
|
|
|
|
- type: mysql_track_table
|
|
args:
|
|
source: mysql
|
|
table:
|
|
name: article
|
|
schema: hasura
|
|
|
|
# create relationships
|
|
|
|
- type: mysql_create_object_relationship
|
|
args:
|
|
source: mysql
|
|
table:
|
|
name: article
|
|
schema: hasura
|
|
name: author
|
|
using:
|
|
foreign_key_constraint_on: author_id
|
|
|
|
- type: mysql_create_object_relationship
|
|
args:
|
|
source: mysql
|
|
table:
|
|
name: article
|
|
schema: hasura
|
|
name: co_author
|
|
using:
|
|
foreign_key_constraint_on: co_author_id
|
|
|
|
- type: mysql_create_array_relationship
|
|
args:
|
|
source: mysql
|
|
table:
|
|
name: author
|
|
schema: hasura
|
|
name: articles
|
|
using:
|
|
foreign_key_constraint_on:
|
|
table:
|
|
name: article
|
|
schema: hasura
|
|
column: author_id
|
|
|
|
- type: mysql_create_array_relationship
|
|
args:
|
|
source: mysql
|
|
table:
|
|
name: author
|
|
schema: hasura
|
|
name: co_articles
|
|
using:
|
|
foreign_key_constraint_on:
|
|
table:
|
|
name: article
|
|
schema: hasura
|
|
column: co_author_id
|