An app for Dota 2 teams, players, heroes, and stats using React and Hasura
All graphics by StumpyPotts
Running docker-compose up
will start up the development containers for the Hasura engine, and PostgreSQL.
- Hasura console - http://localhost:1337.
- React app - http://localhost:9000.
Hasura may fail to connect to the PostgreSQL server, if that happens, running docker-compose up
usually works.
Note: until the Hasura CLI supports tracking tables, issue #1418, every brand new Hasura container instance needs some assistance; you need to tell it to track all the tables it found in the PostgreSQL schema. To do so:
- Open the Hasura console: http://localhost:1337.
- Navigate to the
Data
tab - Select the
dota_2
schema from the dropdown - Next to the Untracked tables or views click Track all
- Then Untracked foreign-key relations click Track all
Everything should be communicating now.
Some insertions may take several minutes purely to dodge the Dota 2 Open API rate limiting, currently at 60 calls per minute.
When fetching the GraphQL schema from Hasura through Apollo codegen Error:
Type query_root must define one or more fields.
Fix: Your Hasura container is probably not running or was inaccessible at the time of the download.