Skip to content

TypeScript, React, Apollo, Hasura GraphQL, PostgreSQL, Docker, Dota2 API

Notifications You must be signed in to change notification settings

ethanae/react-hasura

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An app for Dota 2 teams, players, heroes, and stats using React and Hasura

All graphics by StumpyPotts

development

Running docker-compose up will start up the development containers for the Hasura engine, and PostgreSQL.

cd into /src/client and execute yarn start in your shell to start up the webpack-dev-server.

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:

  1. Open the Hasura console: http://localhost:1337.
  2. Navigate to the Data tab
  3. Select the dota_2 schema from the dropdown
  4. Next to the Untracked tables or views click Track all
  5. Then Untracked foreign-key relations click Track all

Everything should be communicating now.

database seeding

Some insertions may take several minutes purely to dodge the Dota 2 Open API rate limiting, currently at 60 calls per minute.

errors

Below are some errors I ran into which might help you.

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.