Description
Learn how to use Golang and gqlgen to make a clone of Twitter with a GraphQL API
Make a GraphQL API using one of the hottest languages!
Golang is quickly becoming one of the most appreciated backend languages. With it’s strong standard library, you can go really far without adding dependencies.
In this tutorial we will use gqlgen, a library made for building a GraphQL API.
Why use gqlgen over other libraries?
One reason: everything is typed. You will almost never need to use an empty interface
How does gqlgen work?
By using Schema First design, gqlgen will generate the Go code for you. This way all your resolvers will be typed safely.
So what does that mean?
You create your API using GraphQL Schema definition language with the shape you want. And you let gqlgen do all the heavy lifting.
So what’s left to do then?
You just need to plug your business logic into the resolvers, that’s it.
Libraries we will use
- PGX
- scany as SQLX for PGX alternative
- gqlgen
- Dataloaden
- golang-migrate
- Insomnia
- Chi
- PostgreSQL
- godotenv
- testify
Last Updated 1/2023
Download Links
Direct Download
Build a Twitter clone GraphQL API using Golang.zip (1.1 GB) | Mirror