What is gqlkit?
Just types and functions — write TypeScript, generate GraphQL.
Core Concept
Write types and resolvers in TypeScript → run gqlkit gen → get GraphQL schema AST and resolver map.
Design Principles
- Implement first: Write types and resolvers, generate schema when ready. No edit-regenerate-implement loops.
- Just types and functions: Plain TypeScript with a thin API. No complex generics, no decorators.
- Type-safe: TypeScript types become GraphQL types. Resolver signatures checked at compile time.
- Fail fast with actionable errors: Invalid resolver references, type mismatches, and convention violations.
- GraphQL-tools compatible: Generated outputs work seamlessly with
makeExecutableSchema.
How It Works
- Write TypeScript types and resolvers in
src/gqlkit/schema/ - Run
gqlkit gen - gqlkit scans your code, builds internal type graph, and validates resolver signatures
- Outputs
typeDefs(GraphQL AST) andresolversmap tosrc/gqlkit/__generated__/
Last updated on