Gqlts vs GraphQL Zeus
Both Gqlts and GraphQL Zeus let you write GraphQL selections as TypeScript objects. The main difference is product shape: Gqlts focuses on generated SDK packages plus a small runtime for execution, operation generation, batching, uploads, subscriptions, aliases, and type guards.
Where Gqlts fits
Choose Gqlts when you want:
- a generated SDK directory or package from a schema;
- response types derived from the exact selection object;
createClientfor direct execution;generateQueryOpand friends for Apollo, SWR, React Query, fetch, or custom clients;graphql-wssubscriptions;- GraphQL multipart uploads;
- field aliases through
__alias; - scalar expansion with
everything/__scalar; - generated type guards for unions and interfaces.
Gqlts includes @gqlts/runtime in generated clients. That runtime stores a compressed type map so it can validate paths, expand scalars, generate operations, and execute through the built-in fetcher. For very large schemas, review bundle size if the generated client ships directly to browsers.
Mutation shape
GraphQL Zeus:
const result = await Gql.mutation(
{
addCard: [
{
card: $`card`,
},
{
id: true,
},
],
},
{
card: {
Attack: 2,
Defense: 3,
description: 'Lord of the mountains',
name: 'Golrog',
},
},
);Gqlts:
await client.mutation({
addCard: [
{
card: {
Attack: 2,
Defense: 3,
description: 'Lord of the mountains',
name: 'Golrog',
},
},
{
id: true,
},
],
});Alias shape
await client.query({
__alias: {
firstCard: {
card: [{ id: '1' }, { name: true }],
},
secondCard: {
card: [{ id: '2' }, { name: true }],
},
},
});Choosing between them
Use the tool whose API matches your project. If you want a generated SDK with a runtime client and explicit operation helpers, Gqlts is a good fit. If your team already prefers GraphQL Zeus’s API shape and does not need Gqlts runtime features, staying there may be simpler.