Architecture of 99designs/gqlgen
99designs/gqlgen is 883 source files holding 3,354 symbols across 15 modules, written mainly in Go, Shell, TypeScript. The largest module is codegen, with 270 files, and 34 files are entry points into the dependency graph.
How gqlgen fits together
The input is a GraphQL schema together with a gqlgen.yml config file, which the code generator reads. The codegen directory, the largest module by file count, holds that generator and its testserver packages, which check the generated output. The plugin directory contains plugins that extend generation, such as the federation plugin under plugin/federation. The graphql directory provides the runtime library that generated servers use, including ID types such as graphql.ID, graphql.IntID and graphql.UintID. The docs directory holds documentation, and the _examples directory contains sample applications built with gqlgen. Your own resolver code is written against the generated types.
Largest modules
- codegen: 270 files and 16,227 lines of code
- _examples: 177 files and 4,816 lines of code
- plugin: 142 files and 6,067 lines of code
- graphql: 138 files and 13,917 lines of code
- docs: 34 files and 27 lines of code
- .github: 30 files
- integration: 28 files and 311 lines of code
- internal: 22 files and 1,331 lines of code
Languages
By file count: Go 538 files, Shell 16 files, TypeScript 10 files, JavaScript 6 files, Dockerfile 1 file, Makefile 1 file.
More on gqlgen: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos