Skip to content

Commit

Permalink
Bulk request type for Hasura Metadata custom relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsereda committed Feb 26, 2024
1 parent 18d6d0f commit f20ed55
Show file tree
Hide file tree
Showing 20 changed files with 377 additions and 364 deletions.
326 changes: 326 additions & 0 deletions bridge_indexer/hasura/00_untracked_foreign_key_relationships.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,326 @@
{
"type": "bulk",
"source": "default",
"args": [
{
"type": "pg_create_array_relationship",
"args": {
"name": "rollup_outbox_messages",
"table": {
"name": "rollup_commitment",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "rollup_outbox_message",
"schema": "public"
},
"column": "commitment_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "l1_deposits",
"table": {
"name": "rollup_inbox_message",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "l1_deposit",
"schema": "public"
},
"column": "inbox_message_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "l2_deposits",
"table": {
"name": "rollup_inbox_message",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "l2_deposit",
"schema": "public"
},
"column": "inbox_message_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "l1_withdrawals",
"table": {
"name": "rollup_outbox_message",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "l1_withdrawal",
"schema": "public"
},
"column": "outbox_message_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "l2_withdrawals",
"table": {
"name": "rollup_outbox_message",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "l2_withdrawal",
"schema": "public"
},
"column": "outbox_message_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "tezos_tickets",
"table": {
"name": "tezos_token",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "tezos_ticket",
"schema": "public"
},
"column": "token_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_object_relationship",
"args": {
"name": "etherlink_token",
"table": {
"name": "tezos_ticket",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "etherlink_token",
"schema": "public"
},
"column": "ticket_hash"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "l1_deposits",
"table": {
"name": "tezos_ticket",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "l1_deposit",
"schema": "public"
},
"column": "ticket_hash"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "l2_deposits",
"table": {
"name": "tezos_ticket",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "l2_deposit",
"schema": "public"
},
"column": "ticket_hash"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "l2_withdrawals",
"table": {
"name": "tezos_ticket",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "l2_withdrawal",
"schema": "public"
},
"column": "ticket_hash"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "l2_deposits",
"table": {
"name": "etherlink_token",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "l2_deposit",
"schema": "public"
},
"column": "token_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "l2_withdrawals",
"table": {
"name": "etherlink_token",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "l2_withdrawal",
"schema": "public"
},
"column": "token_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "bridge_deposits",
"table": {
"name": "l2_deposit",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "bridge_deposit",
"schema": "public"
},
"column": "l2_transaction_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "bridge_withdrawals",
"table": {
"name": "l2_withdrawal",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "bridge_withdrawal",
"schema": "public"
},
"column": "l2_transaction_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "bridge_deposits",
"table": {
"name": "l1_deposit",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "bridge_deposit",
"schema": "public"
},
"column": "l1_transaction_id"
}
},
"source": "default"
}
},
{
"type": "pg_create_array_relationship",
"args": {
"name": "bridge_withdrawals",
"table": {
"name": "l1_withdrawal",
"schema": "public"
},
"using": {
"foreign_key_constraint_on": {
"table": {
"name": "bridge_withdrawal",
"schema": "public"
},
"column": "l1_transaction_id"
}
},
"source": "default"
}
}
]
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"type": "bulk",
"source": "default",
"args": [
{
"type": "postgres_create_object_relationship",
"args": {
"table": {
"name": "bridge_operation",
"schema": "public"
},
"name": "withdrawal",
"source": "default",
"using": {
"manual_configuration": {
"remote_table": {
"name": "bridge_withdrawal",
"schema": "public"
},
"column_mapping": {
"id": "id"
}
}
}
}
},
{
"type": "postgres_create_object_relationship",
"args": {
"table": {
"name": "bridge_operation",
"schema": "public"
},
"name": "deposit",
"source": "default",
"using": {
"manual_configuration": {
"remote_table": {
"name": "bridge_deposit",
"schema": "public"
},
"column_mapping": {
"id": "id"
}
}
}
}
}
]
}

Loading

0 comments on commit f20ed55

Please sign in to comment.