Boilerplate to get started with Gatsby, Hasura GraphQL engine as CMS and postgres as database using the awesome plugin wyze/gatsby-source-graphql.
-
Deploy Postgres and GraphQL Engine on Heroku:
-
Get the Heroku app URL (say
hasura-graphql-2.herokuapp.com
) -
Clone this repo:
git clone https://github.com/hasura/gatsby-source-hasura.git cd gatsby-source-hasura
-
Goto
hasura/
and editconfig.yaml
:endpoint: https://hasura-graphql-2.herokuapp.com
-
Create
author
table: -
Insert sample data into
author
table:Verify if the row is inserted successfully
-
Run the app (go to the root of the repo):
HASURA_GRAPHQL_URL=https://hasura-graphql-2.herokuapp.com/v1alpha1/graphql npm run develop
-
Test the app Visit http://localhost:8000 to view the app