Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions hasura/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
version: 2
endpoint: http://localhost:8080
admin_secret: key
version: 3
endpoint: https://staging.hasura.skillz.zenika.com/
admin_secret: b39be850-fc0d-49bc-8d7d-cbb3ebf8824c
api_paths:
v1_query: v1/query
v2_query: v2/query
v1_metadata: v1/metadata
graphql: v1/graphql
config: v1alpha1/config
pg_dump: v1alpha1/pg_dump
version: v1/version
metadata_directory: metadata
migrations_directory: migrations
seeds_directory: seeds
actions:
kind: synchronous
handler_webhook_baseurl: http://localhost:3000
codegen:
framework: ""
output_dir: ""
2 changes: 1 addition & 1 deletion hasura/metadata/allow_list.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[]
- collection: allowed-queries
14 changes: 14 additions & 0 deletions hasura/metadata/databases/databases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- name: default
kind: postgres
configuration:
connection_info:
database_url:
from_env: HASURA_GRAPHQL_DATABASE_URL
isolation_level: read-committed
pool_settings:
connection_lifetime: 600
idle_timeout: 180
max_connections: 50
retries: 1
use_prepared_statements: true
tables: "!include default/tables/tables.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
table:
name: AgenciesAverageCurrentSkillsAndDesires
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- skillId
- categoryId
- agency
- name
- averageSkillLevel
- averageDesireLevel
- userCount
filter: {}
role: world
18 changes: 18 additions & 0 deletions hasura/metadata/databases/default/tables/public_Agency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
table:
name: Agency
schema: public
array_relationships:
- name: UserAgencies
using:
foreign_key_constraint_on:
column: agency
table:
name: UserAgency
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- name
filter: {}
role: world
50 changes: 50 additions & 0 deletions hasura/metadata/databases/default/tables/public_Category.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
table:
name: Category
schema: public
array_relationships:
- name: AgenciesAverageCurrentSkillsAndDesires
using:
manual_configuration:
column_mapping:
id: categoryId
insertion_order: null
remote_table:
name: AgenciesAverageCurrentSkillsAndDesires
schema: public
- name: CurrentSkillsAndDesires
using:
manual_configuration:
column_mapping:
id: categoryId
insertion_order: null
remote_table:
name: UsersCurrentSkillsAndDesires
schema: public
- name: Skills
using:
foreign_key_constraint_on:
column: categoryId
table:
name: Skill
schema: public
- name: ZenikasAverageCurrentSkillsAndDesires
using:
manual_configuration:
column_mapping:
id: categoryId
insertion_order: null
remote_table:
name: ZenikasAverageCurrentSkillsAndDesires
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- id
- label
- x
- y
- color
- index
filter: {}
role: world
51 changes: 51 additions & 0 deletions hasura/metadata/databases/default/tables/public_Skill.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
table:
name: Skill
schema: public
object_relationships:
- name: Category
using:
foreign_key_constraint_on: categoryId
array_relationships:
- name: UserSkillDesires
using:
foreign_key_constraint_on:
column: skillId
table:
name: UserSkillDesire
schema: public
- name: UsersCurrentSkillsAndDesires
using:
manual_configuration:
column_mapping:
id: skillId
insertion_order: null
remote_table:
name: UsersCurrentSkillsAndDesires
schema: public
insert_permissions:
- permission:
backend_only: false
check: {}
columns:
- categoryId
- id
- name
role: world
select_permissions:
- permission:
allow_aggregations: true
columns:
- categoryId
- id
- name
filter: {}
role: world
update_permissions:
- permission:
check: {}
columns:
- categoryId
- id
- name
filter: {}
role: world
19 changes: 19 additions & 0 deletions hasura/metadata/databases/default/tables/public_Topic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
table:
name: Topic
schema: public
array_relationships:
- name: UserTopics
using:
foreign_key_constraint_on:
column: topicId
table:
name: UserTopic
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- id
- name
filter: {}
role: world
68 changes: 68 additions & 0 deletions hasura/metadata/databases/default/tables/public_User.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
table:
name: User
schema: public
object_relationships:
- name: UserLatestAgency
using:
manual_configuration:
column_mapping:
email: userEmail
insertion_order: null
remote_table:
name: UserLatestAgency
schema: public
array_relationships:
- name: UserAgencies
using:
foreign_key_constraint_on:
column: userEmail
table:
name: UserAgency
schema: public
- name: UserSkillDesires
using:
foreign_key_constraint_on:
column: userEmail
table:
name: UserSkillDesire
schema: public
- name: UserTopics
using:
foreign_key_constraint_on:
column: userEmail
table:
name: UserTopic
schema: public
insert_permissions:
- permission:
backend_only: false
check:
email:
_eq: x-hasura-user-email
columns:
- email
- name
- picture
role: world
select_permissions:
- permission:
allow_aggregations: true
columns:
- email
- name
- picture
filter: {}
role: world
update_permissions:
- permission:
check:
email:
_eq: x-hasura-user-email
columns:
- email
- name
- picture
filter:
email:
_eq: x-hasura-user-email
role: world
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
table:
name: UserAchievements
schema: public
object_relationships:
- name: User
using:
foreign_key_constraint_on: userEmail
insert_permissions:
- permission:
backend_only: false
check:
userEmail:
_eq: x-hasura-user-email
columns: []
role: world
select_permissions:
- permission:
allow_aggregations: true
columns:
- additionalInfo
- created_at
- id
- label
- points
- step
- userEmail
filter: {}
role: world
update_permissions:
- permission:
check:
userEmail:
_eq: x-hasura-user-email
columns: []
filter:
userEmail:
_eq: x-hasura-user-email
role: world
43 changes: 43 additions & 0 deletions hasura/metadata/databases/default/tables/public_UserAgency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
table:
name: UserAgency
schema: public
object_relationships:
- name: Agency
using:
foreign_key_constraint_on: agency
- name: User
using:
foreign_key_constraint_on: userEmail
insert_permissions:
- permission:
backend_only: false
check:
userEmail:
_eq: x-hasura-user-email
columns:
- userEmail
- agency
- created_at
role: world
select_permissions:
- permission:
allow_aggregations: true
columns:
- created_at
- agency
- userEmail
filter: {}
role: world
update_permissions:
- permission:
check:
userEmail:
_eq: x-hasura-user-email
columns:
- userEmail
- agency
- created_at
filter:
userEmail:
_eq: x-hasura-user-email
role: world
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
table:
name: UserLatestAgency
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- userEmail
- agency
filter: {}
role: world
Loading