GQty is a No-GraphQL client for TypeScript that auto-generates a fully typed client from your GraphQL schema, eliminating manual query writing. Current stable version is 3.6.0. It uses a proxy-based approach to automatically track data requirements and generate optimal queries. Compared to other clients like Apollo or Urql, GQty removes boilerplate and provides real-time type safety, making it ideal for TypeScript-heavy projects. It ships TypeScript types, supports subscriptions via graphql-ws and SSE via graphql-sse, and has a growing community on Discord.
npm install gqtyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a GQty client and execute a simple query to fetch a field named 'hello'.
Ensure data access happens within React components or with explicit await on queries.
Use createClient from 'gqty' and @gqty/react for hooks instead of previous monolithic imports.
Replace useMutation with client.mutation() in event handlers or use useTransaction from @gqty/react.
Ensure your GraphQL endpoint is accessible during development and runtime.
Install: npm install graphql-ws graphql-sse
Run: npm install gqty
Upgrade to GQty v3 and use createClient correctly: import { createClient } from 'gqty'Regenerate the client: npx gqty generate
Check server logs and ensure your query matches the schema. Use client.$query to inspect the generated query.