/plushcap/analysis/hasura/building-a-graphql-api-with-golang-postgres-and-hasura

Building a GraphQL API with Golang, Postgres, and Hasura

What's this blog post about?

This article explores building a GraphQL API for a cinema movie catalog using Golang connected to a Postgres database on Hasura. The process involves setting up prerequisites such as installing Golang, preferred code editor, and understanding the basics of GraphQL. Next, developers select a Golang GraphQL library (gqlgen) due to its type safety and code generation features. They then set up their Golang project and gqlgen, define the GraphQL schema for their Movie API, generate GraphQL resolvers, provision a Postgres database on Hasura Cloud, connect the Postgres database to Golang, implement generated resolvers, and test the Golang GraphQL API. The article concludes by highlighting how Hasura can make setting up GraphQL APIs even easier with its built-in support for caching, authentication, and role-based permission down to the column level.

Company
Hasura

Date published
Jan. 25, 2022

Author(s)
Hasura

Word count
1703

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.