Apollo GraphQL Server + TypeScript Apollo GraphQL Server + TypeScript typescript typescript

Apollo GraphQL Server + TypeScript


I wrote a small library and a CLI for this. It generates TypeScript typings for both server (according to your schema) and client (according to your schema and GraphQL documents).It also generates resolvers signature and very customizable.

You can try it here: https://github.com/dotansimha/graphql-code-generator

The idea behind it was to allow the developer to get the most out of GraphQL and the generated typings, and making it easier to customize the generated output.


I am using a GraphQL CLI. You would install it like so

npm install -g graphql-cli

then generate your GraphQL project with TypeScript support

enter image description here

More information: https://oss.prisma.io/content/graphql-cli/05-Boilerplates.html


I've been using typescript + apollo graphql server for quite some time and started a template which incorporates dotan's graphql-code-generator along with some a defined folder structure and approach which makes everything work together nicely. Focus is to keep it simple, but I continue to add to it as I find good practices and useful libraries.

The github repo is here.