/plushcap/analysis/hasura/build-react-static-sites-using-hasura-graphql-on-postgres

Build react-static sites using GraphQL on Postgres

What's this blog post about?

This tutorial demonstrates how to build a react-static site using GraphQL on Postgres. React-static is a highly performant static site generator for React that supports custom query layers like GraphQL. The API part of JAMStack allows users to create powerful static sites, with all database actions abstracted into GraphQL APIs and accessed over HTTPS with JavaScript. Hasura provides GraphQL APIs on top of Postgres, which can be leveraged effectively to build a site with react-static. A demo app is provided that walks through building a simple blog app, listing all authors and articles written by each author. The implementation details involve fetching data from Postgres and templating it on a React component using GraphQL queries. This method of rendering static pages improves performance and makes scaling easier with the use of CDNs. A boilerplate and tutorial are available for users to get started quickly, and further reading is suggested on JAMStack and react-static documentation.

Company
Hasura

Date published
Feb. 12, 2019

Author(s)
Praveen Durairaju

Word count
793

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.