Skip to content

xaaha/address-api

Repository files navigation

Go GraphQL Address API

This project is a GraphQL API built with Go that serves address data. It was created as a learning exercise to explore GraphQL server development in Go, including database migration, testing, and authentication with API keys.


✨ Features

  • GraphQL API: Exposes address data through a clean GraphQL interface.
  • SQLite Database: Uses a local SQLite database for data persistence.
  • Database Migration: Includes a script to migrate data from JSON files into the database.
  • Authentication: Protects specific queries using an API key and GraphQL directives.
  • Repository Pattern: Separates database logic from the API layer for clean architecture.
  • Integration & Unit Tests: Includes tests for both the repository (with a real in-memory DB) and the resolvers (with mocks).
  • Dockerized: Comes with a Dockerfile for easy containerization and deployment.

🛠️ Tech Stack


🚀 Getting Started

Prerequisites

  • Go (version 1.21 or later)
  • Docker Desktop (for containerizing)
  • make (optional, for using the Makefile shortcuts)

1. Installation

Clone the repository to your local machine:

git clone [email protected]:xaaha/address-api.git
cd address-api
  • Start the server
make server

About

Graphql API built with Go that serves address data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •