soda-gql is a zero-runtime-like GraphQL query generation system that brings PandaCSS's approach to GraphQL. Write type-safe queries in TypeScript that are statically analyzed and transformed at build time into optimized GraphQL documents.
Traditional GraphQL development involves a code generation loop:
This cycle creates friction: you write code in two languages, wait for generation, and deal with out-of-sync types.
soda-gql eliminates this loop. You write everything in TypeScript, and the build system handles the rest.
Inspired by PandaCSS, soda-gql analyzes your code at build time and embeds pre-computed data as JSON. However, unlike CSS which is truly zero-runtime, soda-gql still requires runtime processing for:
What happens at build time:
This approach eliminates the codegen loop while keeping runtime overhead minimal.
Fragments define reusable field selections for GraphQL types:
Operations define complete GraphQL queries, mutations, or subscriptions with field selections:
Ready to get started? Head to the Getting Started guide.