Graphql-zeus (opens in a new tab)
Some differences are
- Gqlts has subscriptions: https://gqlts.vercel.app/docs/usage/subscriptions (opens in a new tab)
- Gqlts has batching built in: https://gqlts.vercel.app/docs/usage/batching-queries (opens in a new tab)
- Gqlts has a dependency on
@gqlts/runtime
, graphql zeus does not - Gqlts does not support aliases
- Gqlts will have a big bundle size for large graphql schemas because it needs to store some schema information, this information is really compressed but it can be a problem for large schemas (see an example of this data here (opens in a new tab))
- With gqlts you can easily fetch all scalar fields of a type: https://gqlts.vercel.app/docs/usage/selecting-fields#querying-all-fields (opens in a new tab)
- Easier variables passing
graphql zeus
const test = 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,
},
],
})