Introduction

Table of contents

No heading

No headings in the article.

This article is part of a tutorial series on building GraphQL API with Go and PostgresQL.

GraphQL

GraphQL is a query language and server-side runtime for application programming interfaces (APIs). GraphQL was developed by Facebook in 2012 as an internal tool before it was made available publicly in 2015.

GraphQL is a viable alternative to REST as it solves some of the challenges posed by REST such as:

  • Over-fetching of data, a situation that occurs when an API endpoint returns more data than is currently required by the client.
  • Under-fetching of data. An endpoint does not return enough data as required by the client and thus there may be need to touch base with the database a few times to get the needed information.
  • GraphQL eliminates the need to create tons of endpoints in an API set up.

To learn more about GraphQL and how to start using this amazing technology, you can visit here.

Project

Early 2021, I was following along a python (django) tutorial to build a web app I named tech hub. It's a social media media platform targeting developers (the front end is quite crude, so don't expect much). Ever since then I've gone on to code with other languages such as Go, Haskell and Ruby.

This project is all about converting tech hub into a GraphQL API using Go as the programming language, postgres as the database. At the end of this project, the whole set up will be dockerized.