Genql is a type-safe GraphQL query builder that generates TypeScript clients from GraphQL schemas. The core functionality resides in the CLI (@genql/cli) which introspects a GraphQL schema and emits a client enabling compile-time query validation and autocompletion. The repository also includes a Next.js website for documentation and a converter tool, plus a scraper subsystem that automatically discovers public GraphQL APIs via Sourcegraph, generates clients, and publishes them to npm. The architecture is a monorepo managed by pnpm with three main components: cli (code generation and runtime), website (documentation and converter), and scraper (automated discovery and publishing). Key features include batching queries, subscriptions, framework-agnostic design, and support for Node.js, browser, Deno, and Cloudflare environments.
This repository is a GraphQL code generation library and build plugin suite. It parses GraphQL schemas (SDL or introspection JSON) and generates Java, Kotlin, and Scala source files for types, enums, interfaces, unions, resolvers, client request/response classes, and response projections. The architecture is a core codegen engine with language-specific adapters (JavaGraphQLCodegen, KotlinGraphQLCodegen, ScalaGraphQLCodegen) that use FreeMarker templates for output. It integrates with Gradle, Maven, and SBT via dedicated plugins. External dependencies include graphql-java for schema parsing, FreeMarker for templating, and Jackson for serialization in generated code. The system supports extensive configuration (naming conventions, annotations, custom type mappings, Relay support) and is designed for schema-first development on both server and client sides.
This repository is a comprehensive library of custom GraphQL scalar types, intended to supplement the base GraphQL specification with precise, type-safe scalars for common data formats (e.g., UUID, DateTime, EmailAddress, PhoneNumber, IBAN, GeoJSON, ISBN, etc.). It exports over 80 scalar definitions as `GraphQLScalarType` instances, along with corresponding SDL type definitions, mock generators, and JSON Schema extensions. The architecture is clean and uniform: each scalar is implemented as a self-contained module with `serialize`, `parseValue`, and `parseLiteral` methods, leveraging a shared validation pattern via `createGraphQLError`. The library integrates seamlessly with GraphQL codegen via `extensions.codegenScalarType` and provides a `RegularExpression` factory for creating custom regex-based scalars. Production usage is as a dependency for GraphQL servers (Apollo, Yoga, etc.) where precise input validation and output formatting are required. The codebase is well-tested with per-scalar unit tests, integration tests for date/time scalars, and bundle-size checks. While the majority of scalars are simple regex or range validations, several modules (GeoJSON, IBAN, iso-date) demonstrate non-trivial validation logic and are safely reusable. The repository also includes a Next.js documentation website and automated release tooling via Changesets.