Log in to GraphQL Editor
Projects Cloud

Use as a library | Zeus GraphQL TypeScript generator

Generate Code

This will be rarely used, but here you are! Use Zeus to generate Typescript and Javascript from GraphQL definitions

import { TreeToTS } from 'graphql-zeus';
import { Parser } from 'graphql-js-tree';

const schemaFileContents = `
type Query{
    hello: String!
    query: Query

const typeScriptDefinition = TreeToTS.resolveTree(

Dynamically Fetch Schema

This is useful when you need your schema fetched from your GraphQL endpoint in-code

import { Utils } from 'graphql-zeus';

  (schemaContent) => {
    // Use schema content here