hasura init {{name}}
cd {{name}}
- Create docker-compose file
docker-compose up
export HASURA_GRAPHQL_ADMIN_SECRET='myadminsecretkey'
hasura console
- Data > Connect database
- Fill out details, use
PG_DATABASE_URL
as the env var - should connect the database, one schema called "public" - Start creating your tables (these will create you migrations):
- Party Types
- Parties
- Relationship Types
- Relationship
- Teams
- Resources
- Team Subjects
- Add some relationships
- Relationships
- from_party (O)
- to_party (O)
- Teams
- subjects (A)
- resources (A)
- Subjects
- team (O)
- party (O)
- Resources
- team (O)
- Parties (might need renaming)
- from_party_relationships (A)
- to_party_relationships (A)
- team_subjects (A)
- Populate some data - insert some records
- Create a seed file from the current data
hasura seed create initial_seed_data --from-table parties --from-table party_types --from-table relationship_types --from-table relationships --from-table resources --from-table subjects --from-table teams
hasura seed apply