Skip to main content

Grats

The cleanest way to build a TypeScript GraphQL server

No Duplication

Grats uses your existing TypeScript types to derive your GraphQL schema.

No Conflicts

Since your implementation is your schema, there's no need to validate that they match.

No Runtime

Grats extracts an executable graphql-js schema at build time. No Grats code is needed at runtime.

/**
* A user in our kick-ass system!
* @gqlType */
class User {
/** @gqlField */
name: string;

/** @gqlField */
greet(greeting: string): string {
return `${greeting}, ${this.name}`;
}
}
Playground

Schema

"""A user in our kick-ass system!"""
type User {
greet(greeting: String!): String
name: String
}