Log in to GraphQL Editor
Docs
Introduction
External Tools
CLI

JavaScript | Zeus GraphQL TypeScript generator

To use Zeus with JavaScript as an autocomplete tool you need to install TypeScript, run the Zeus CLI, and then transform the result to JS using tsc

$ npm i -D typescript
# OR
# yarn add -D typescript

Generate Zeus:

$ zeus schema.graphql ./

and transform it using Typescript:

$ npx tsc ./zeus/*.ts --declaration --target es5 --skipLibCheck
# OR
# yarn tsc ./zeus/*.ts --declaration --target es5 --skipLibCheck

This will generate an out.d.ts file so that you can have auto-completion.