
Show HN: GraphQL Zeus – Autocomplete GraphQL Queries in JavaScript and TS - aexol
https://github.com/graphql-editor/graphql-zeus
======
aexol
First real autocomplete for GraphQL queries in both JS in browser and NodeJS
and TS.

Generate library using zeus command:

$ zeus
[https://faker.graphqleditor.com/aexol/olympus/graphql](https://faker.graphqleditor.com/aexol/olympus/graphql)
./generated

And use it like this

let DionysusCard = await Api(

    
    
        'https://faker.graphqleditor.com/aexol/olympus/graphql'
    
      ).Mutation.addCard({
    
        card: {
    
          name: 'Dionysus',
    
          description:
    
            'Dionysus is the Greek god of wine, has the power to bring the dead back to life.',
    
          Attack: 1,
    
          Defense: 15,
    
          Children: 9
    
        }
    
      })({
    
        id: true,
    
        name: true
    
      });

------
workcat
Wow! Great job! This would be awesome to use together with apollo-client.

~~~
chrischen
Is this not a client library that competes with apollo-client?

~~~
aexol
You can use it with any stack you want. Apollo is not only a client tool but
also many other cool tools for GraphQL. I created this tool for simpler
situations. Also here you have query safely typed so you don't have to
remember the whole schema.

~~~
chrischen
But I mean you would use this as your client to make queries, in place of
apollo client right?

~~~
workcat
So I was thinking of using the additional features of Apollo client such as
caching, network status etc, while leveraging the auto-complete and typesafety
of GraphQL Zeus. Auto-complete is what I really miss from Apollo and I feel
like the type-generation from gql-tags is a more cumbersome way than what Zeus
is doing.

~~~
aexol
EDIT: I've just found it. I saw this before, this is a totally different
approach with many dependencies underneath. Having to install many packages,
using specific editor, etc.. This setup might be the best of course, but I am
99% sure it's hard to maintain so many packages to have GraphQL syntax up-to-
date. I used it before but was angry they didn't support the new documentation
format.

GraphQL Zeus is only one functionality package so it is easier to maintain.

