diff --git a/hasura/metadata/backend_configs.yaml b/hasura/metadata/backend_configs.yaml new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/hasura/metadata/backend_configs.yaml @@ -0,0 +1 @@ +{} diff --git a/hasura/metadata/databases/databases.yaml b/hasura/metadata/databases/databases.yaml index c5fc0e47..eb6d5557 100644 --- a/hasura/metadata/databases/databases.yaml +++ b/hasura/metadata/databases/databases.yaml @@ -1,9 +1,9 @@ -- name: athena +- name: djuno kind: postgres configuration: connection_info: + use_prepared_statements: false database_url: from_env: HASURA_GRAPHQL_DATABASE_URL isolation_level: read-committed - use_prepared_statements: false - tables: "!include athena/tables/tables.yaml" + tables: "!include djuno/tables/tables.yaml" diff --git a/hasura/metadata/databases/djuno/tables/public_application_link.yaml b/hasura/metadata/databases/djuno/tables/public_application_link.yaml index fcf02321..c81b3c71 100644 --- a/hasura/metadata/databases/djuno/tables/public_application_link.yaml +++ b/hasura/metadata/databases/djuno/tables/public_application_link.yaml @@ -1,32 +1,25 @@ table: - name: application_link schema: public + name: application_link object_relationships: - name: oracle_request using: manual_configuration: - column_mapping: - id: application_link_id - insertion_order: null remote_table: - name: application_link_oracle_request schema: public + name: application_link_oracle_request + insertion_order: null + column_mapping: + id: application_link_id - name: profile using: manual_configuration: - column_mapping: - user_address: address - insertion_order: null remote_table: - name: profile - schema: public - - name: score - using: - foreign_key_constraint_on: - column: application_link_row_id - table: - name: application_link_score schema: public + name: profile + insertion_order: null + column_mapping: + user_address: address select_permissions: - role: anonymous permission: diff --git a/hasura/metadata/databases/djuno/tables/public_application_link_oracle_request.yaml b/hasura/metadata/databases/djuno/tables/public_application_link_oracle_request.yaml index ab4a7a74..c9cc2aa3 100644 --- a/hasura/metadata/databases/djuno/tables/public_application_link_oracle_request.yaml +++ b/hasura/metadata/databases/djuno/tables/public_application_link_oracle_request.yaml @@ -1,10 +1,6 @@ table: - name: application_link_oracle_request schema: public -object_relationships: - - name: application_link - using: - foreign_key_constraint_on: application_link_id + name: application_link_oracle_request select_permissions: - role: anonymous permission: diff --git a/hasura/metadata/databases/djuno/tables/public_application_link_score.yaml b/hasura/metadata/databases/djuno/tables/public_application_link_score.yaml index 83b7332b..9644fc80 100644 --- a/hasura/metadata/databases/djuno/tables/public_application_link_score.yaml +++ b/hasura/metadata/databases/djuno/tables/public_application_link_score.yaml @@ -1,6 +1,6 @@ table: - name: application_link_score schema: public + name: application_link_score select_permissions: - role: anonymous permission: diff --git a/hasura/metadata/databases/djuno/tables/public_block.yaml b/hasura/metadata/databases/djuno/tables/public_block.yaml index e1168903..595e2f4d 100644 --- a/hasura/metadata/databases/djuno/tables/public_block.yaml +++ b/hasura/metadata/databases/djuno/tables/public_block.yaml @@ -1,3 +1,3 @@ table: - name: block schema: public + name: block diff --git a/hasura/metadata/databases/djuno/tables/public_chain_link.yaml b/hasura/metadata/databases/djuno/tables/public_chain_link.yaml index f045164b..3ea24fde 100644 --- a/hasura/metadata/databases/djuno/tables/public_chain_link.yaml +++ b/hasura/metadata/databases/djuno/tables/public_chain_link.yaml @@ -1,6 +1,6 @@ table: - name: chain_link schema: public + name: chain_link object_relationships: - name: chain_config using: @@ -8,29 +8,29 @@ object_relationships: - name: profile using: manual_configuration: - column_mapping: - user_address: address - insertion_order: null remote_table: - name: profile schema: public + name: profile + insertion_order: null + column_mapping: + user_address: address - name: proof using: manual_configuration: - column_mapping: - id: chain_link_id - insertion_order: null remote_table: - name: chain_link_proof schema: public + name: chain_link_proof + insertion_order: null + column_mapping: + id: chain_link_id array_relationships: - name: chain_link_proofs using: foreign_key_constraint_on: column: chain_link_id table: - name: chain_link_proof schema: public + name: chain_link_proof select_permissions: - role: anonymous permission: diff --git a/hasura/metadata/databases/djuno/tables/public_chain_link_chain_config.yaml b/hasura/metadata/databases/djuno/tables/public_chain_link_chain_config.yaml index 7e15af42..99b3f08f 100644 --- a/hasura/metadata/databases/djuno/tables/public_chain_link_chain_config.yaml +++ b/hasura/metadata/databases/djuno/tables/public_chain_link_chain_config.yaml @@ -1,14 +1,14 @@ table: - name: chain_link_chain_config schema: public + name: chain_link_chain_config array_relationships: - name: chain_links using: foreign_key_constraint_on: column: chain_config_id table: - name: chain_link schema: public + name: chain_link select_permissions: - role: anonymous permission: diff --git a/hasura/metadata/databases/djuno/tables/public_chain_link_proof.yaml b/hasura/metadata/databases/djuno/tables/public_chain_link_proof.yaml index 0a49882b..ca2f09ca 100644 --- a/hasura/metadata/databases/djuno/tables/public_chain_link_proof.yaml +++ b/hasura/metadata/databases/djuno/tables/public_chain_link_proof.yaml @@ -1,6 +1,6 @@ table: - name: chain_link_proof schema: public + name: chain_link_proof object_relationships: - name: chain_link using: diff --git a/hasura/metadata/databases/djuno/tables/public_dtag_transfer_requests.yaml b/hasura/metadata/databases/djuno/tables/public_dtag_transfer_requests.yaml index d208163e..335ee562 100644 --- a/hasura/metadata/databases/djuno/tables/public_dtag_transfer_requests.yaml +++ b/hasura/metadata/databases/djuno/tables/public_dtag_transfer_requests.yaml @@ -1,25 +1,25 @@ table: - name: dtag_transfer_requests schema: public + name: dtag_transfer_requests object_relationships: - name: receiver using: manual_configuration: - column_mapping: - receiver_address: address - insertion_order: null remote_table: - name: profile schema: public + name: profile + insertion_order: null + column_mapping: + receiver_address: address - name: sender using: manual_configuration: - column_mapping: - sender_address: address - insertion_order: null remote_table: - name: profile schema: public + name: profile + insertion_order: null + column_mapping: + sender_address: address select_permissions: - role: anonymous permission: diff --git a/hasura/metadata/databases/djuno/tables/public_poll_answer.yaml b/hasura/metadata/databases/djuno/tables/public_poll_answer.yaml index 679aee34..8a8bbe8a 100644 --- a/hasura/metadata/databases/djuno/tables/public_poll_answer.yaml +++ b/hasura/metadata/databases/djuno/tables/public_poll_answer.yaml @@ -1,15 +1,3 @@ table: - name: poll_answer schema: public -object_relationships: - - name: post_attachment - using: - foreign_key_constraint_on: attachment_row_id -select_permissions: - - role: anonymous - permission: - columns: - - answers_indexes - - user_address - filter: {} - allow_aggregations: true + name: poll_answer diff --git a/hasura/metadata/databases/djuno/tables/public_profile.yaml b/hasura/metadata/databases/djuno/tables/public_profile.yaml index 973d7f6a..20ec6193 100644 --- a/hasura/metadata/databases/djuno/tables/public_profile.yaml +++ b/hasura/metadata/databases/djuno/tables/public_profile.yaml @@ -1,70 +1,52 @@ table: - name: profile schema: public + name: profile array_relationships: - name: applications_links using: manual_configuration: - column_mapping: - address: user_address - insertion_order: null remote_table: - name: application_link schema: public + name: application_link + insertion_order: null + column_mapping: + address: user_address - name: chain_links using: manual_configuration: - column_mapping: - address: user_address - insertion_order: null remote_table: - name: chain_link schema: public - - name: default_chain_links - using: - manual_configuration: + name: chain_link + insertion_order: null column_mapping: address: user_address - insertion_order: null - remote_table: - name: default_chain_link - schema: public - - name: followage + - name: incoming_dtag_transfer_requests using: manual_configuration: - column_mapping: - address: counterparty_address - insertion_order: null remote_table: - name: user_relationship schema: public - - name: following - using: - manual_configuration: - column_mapping: - address: creator_address + name: dtag_transfer_requests insertion_order: null - remote_table: - name: user_relationship - schema: public - - name: incoming_dtag_transfer_requests - using: - manual_configuration: column_mapping: address: receiver_address - insertion_order: null - remote_table: - name: dtag_transfer_requests - schema: public - name: outgoing_dtag_transfer_requests using: manual_configuration: - column_mapping: - address: sender_address - insertion_order: null remote_table: - name: dtag_transfer_requests schema: public + name: dtag_transfer_requests + insertion_order: null + column_mapping: + address: sender_address +computed_fields: + - name: is_user_following + definition: + function: + schema: public + name: is_user_following_profile + session_argument: hasura_session + table_argument: profile_row + comment: A computed field that tells whether the current Hasura user is following this profile select_permissions: - role: anonymous permission: @@ -76,5 +58,23 @@ select_permissions: - dtag - nickname - profile_pic + computed_fields: + - is_user_following filter: {} limit: 20 + allow_aggregations: true + - role: user + permission: + columns: + - address + - bio + - cover_pic + - creation_time + - dtag + - nickname + - profile_pic + computed_fields: + - is_user_following + filter: {} + limit: 100 + allow_aggregations: true diff --git a/hasura/metadata/databases/djuno/tables/public_profiles_params.yaml b/hasura/metadata/databases/djuno/tables/public_profiles_params.yaml index 33fcca84..901c8e60 100644 --- a/hasura/metadata/databases/djuno/tables/public_profiles_params.yaml +++ b/hasura/metadata/databases/djuno/tables/public_profiles_params.yaml @@ -1,6 +1,6 @@ table: - name: profiles_params schema: public + name: profiles_params select_permissions: - role: anonymous permission: diff --git a/hasura/metadata/databases/djuno/tables/public_user_block.yaml b/hasura/metadata/databases/djuno/tables/public_user_block.yaml index 15a5f7e9..efcaad93 100644 --- a/hasura/metadata/databases/djuno/tables/public_user_block.yaml +++ b/hasura/metadata/databases/djuno/tables/public_user_block.yaml @@ -1,28 +1,25 @@ table: - name: user_block schema: public + name: user_block object_relationships: - name: blocked using: manual_configuration: - column_mapping: - blocked_address: address - insertion_order: null remote_table: - name: profile schema: public + name: profile + insertion_order: null + column_mapping: + blocked_address: address - name: blocker using: manual_configuration: - column_mapping: - blocker_address: address - insertion_order: null remote_table: - name: profile schema: public - - name: subspace - using: - foreign_key_constraint_on: subspace_id + name: profile + insertion_order: null + column_mapping: + blocker_address: address select_permissions: - role: anonymous permission: @@ -32,4 +29,3 @@ select_permissions: - reason - subspace_id filter: {} - limit: 50 diff --git a/hasura/metadata/databases/djuno/tables/public_user_relationship.yaml b/hasura/metadata/databases/djuno/tables/public_user_relationship.yaml index 81519180..1dfdd5a0 100644 --- a/hasura/metadata/databases/djuno/tables/public_user_relationship.yaml +++ b/hasura/metadata/databases/djuno/tables/public_user_relationship.yaml @@ -1,28 +1,25 @@ table: - name: user_relationship schema: public + name: user_relationship object_relationships: - name: counterparty using: manual_configuration: - column_mapping: - counterparty_address: address - insertion_order: null remote_table: - name: profile schema: public + name: profile + insertion_order: null + column_mapping: + counterparty_address: address - name: creator using: manual_configuration: - column_mapping: - creator_address: address - insertion_order: null remote_table: - name: profile schema: public - - name: subspace - using: - foreign_key_constraint_on: subspace_id + name: profile + insertion_order: null + column_mapping: + creator_address: address select_permissions: - role: anonymous permission: @@ -31,5 +28,4 @@ select_permissions: - creator_address - subspace_id filter: {} - limit: 50 allow_aggregations: true diff --git a/hasura/metadata/databases/djuno/tables/tables.yaml b/hasura/metadata/databases/djuno/tables/tables.yaml index ab49d285..4ad12c1c 100644 --- a/hasura/metadata/databases/djuno/tables/tables.yaml +++ b/hasura/metadata/databases/djuno/tables/tables.yaml @@ -1,43 +1,13 @@ - "!include public_application_link.yaml" - "!include public_application_link_oracle_request.yaml" - "!include public_application_link_score.yaml" -- "!include public_authz_grant.yaml" - "!include public_block.yaml" - "!include public_chain_link.yaml" - "!include public_chain_link_chain_config.yaml" - "!include public_chain_link_proof.yaml" -- "!include public_contract.yaml" -- "!include public_default_chain_link.yaml" - "!include public_dtag_transfer_requests.yaml" -- "!include public_fee_grant.yaml" -- "!include public_fees_params.yaml" -- "!include public_notification.yaml" - "!include public_poll_answer.yaml" -- "!include public_post.yaml" -- "!include public_post_attachment.yaml" -- "!include public_post_hashtag.yaml" -- "!include public_post_mention.yaml" -- "!include public_post_reference.yaml" -- "!include public_post_tag.yaml" -- "!include public_post_transaction.yaml" -- "!include public_post_url.yaml" -- "!include public_posts_params.yaml" - "!include public_profile.yaml" - "!include public_profiles_params.yaml" -- "!include public_reaction.yaml" -- "!include public_report.yaml" -- "!include public_report_reason.yaml" -- "!include public_reports_params.yaml" -- "!include public_subspace.yaml" -- "!include public_subspace_free_text_params.yaml" -- "!include public_subspace_registered_reaction.yaml" -- "!include public_subspace_registered_reaction_params.yaml" -- "!include public_subspace_report_reason.yaml" -- "!include public_subspace_section.yaml" -- "!include public_subspace_user_group.yaml" -- "!include public_subspace_user_group_member.yaml" -- "!include public_subspace_user_permission.yaml" -- "!include public_tip_post.yaml" -- "!include public_tip_user.yaml" - "!include public_user_block.yaml" - "!include public_user_relationship.yaml" diff --git a/hasura/metadata/metrics_config.yaml b/hasura/metadata/metrics_config.yaml new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/hasura/metadata/metrics_config.yaml @@ -0,0 +1 @@ +{} diff --git a/hasura/metadata/opentelemetry.yaml b/hasura/metadata/opentelemetry.yaml new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/hasura/metadata/opentelemetry.yaml @@ -0,0 +1 @@ +{}