Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. GraphQL
  3. genql

genql

MITTypeScript@genql/cli@6.3.4

A type-safe TypeScript query builder for GraphQL APIs with auto-completion and validation.

Visit WebsiteGitHubGitHub
976 stars43 forks0 contributors

What is genql?

Genql is a type-safe GraphQL query builder for TypeScript that generates a client from a GraphQL schema. It provides auto-completion and compile-time validation to prevent runtime errors and streamline GraphQL API interactions.

Target Audience

TypeScript developers building applications with GraphQL APIs who want improved type safety and developer experience.

Value Proposition

Developers choose Genql for its zero-dependency, type-safe approach that integrates with any GraphQL client and supports advanced features like batching and subscriptions without runtime overhead.

Overview

Type safe TypeScript client for any GraphQL API

Use Cases

Best For

  • Building type-safe GraphQL clients in TypeScript projects
  • Ensuring GraphQL queries are validated against the schema at compile time
  • Reducing bundle size by eliminating runtime GraphQL dependencies
  • Integrating GraphQL with Apollo, Relay, or custom clients
  • Implementing GraphQL subscriptions with type safety
  • Optimizing performance with batched GraphQL queries

Not Ideal For

  • Projects with highly dynamic GraphQL queries constructed at runtime, as Genql relies on compile-time generation
  • Teams using plain JavaScript without TypeScript, since Genql's core value is type safety and auto-completion
  • Environments where schema changes frequently and a zero-build-step workflow is preferred

Pros & Cons

Pros

Type Safety & Auto-Completion

Provides full TypeScript support with compile-time validation, ensuring queries are always valid against the schema and offering intelligent auto-completion, as highlighted in the README's emphasis on eliminating runtime errors.

Zero Runtime Dependencies

Eliminates the need for the 'graphql' package, reducing bundle size and avoiding runtime parsing overhead, which is a key feature noted in the README for performance optimization.

Client Flexibility

Works with any GraphQL client like Apollo or Relay, allowing seamless integration into existing projects without vendor lock-in, as demonstrated in the documentation for client agnosticism.

Advanced Feature Support

Includes built-in support for subscriptions and query batching, enabling complex GraphQL operations with type safety, as detailed in the README's features list.

Cons

Client Generation Overhead

Requires regenerating the client after every schema change, adding a build step that can slow down development and complicate workflows, especially in fast-iterating projects.

Custom Query Syntax

Uses an object-based syntax that differs from standard GraphQL strings, requiring developers to adapt to a new way of writing queries, which might increase initial learning time.

Limited Language Support

Designed specifically for TypeScript, offering no benefits for teams using plain JavaScript or other languages, limiting its applicability in mixed or non-TypeScript environments.

Frequently Asked Questions

Quick Stats

Stars976
Forks43
Contributors0
Open Issues6
Last commit1 month ago
CreatedSince 2020

Tags

#query-builder#developer-tools#type-safety#schema-validation#auto-completion#typescript#api-client#graphql-client#code-generation

Built With

T
TypeScript

Links & Resources

Website

Included in

GraphQL15.0k
Auto-fetched 16 hours ago

Related Projects

apollo-clientapollo-client

The industry-leading GraphQL client for TypeScript, JavaScript, React, Vue, Angular, and more. Apollo Client delivers powerful caching, intuitive APIs, and comprehensive developer tools to accelerate your app development.

Stars19,800
Forks2,752
Last commit1 day ago
relayrelay

Relay is a JavaScript framework for building data-driven React applications.

Stars18,949
Forks1,895
Last commit17 hours ago
aws-amplifyaws-amplify

A declarative JavaScript library for application development using cloud services.

Stars9,560
Forks2,175
Last commit1 day ago
urqlurql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

Stars8,964
Forks478
Last commit14 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub