AeroGraphQL is not yet ready for production and currently under development.
What is AeroGraphQL ?
AeroGraphQL is a small and opinionated Typescript toolkit to create GraphQL server using a declarative approach.
Define your GraphQL schema using Typescript annotations and integrate seamlessly your GraphQL resolvers using those same types, directly in Typescript.
Use the builtin middleware mecanism to implement authentication, authorization, guards or resolvers logics.
Organize and test your code easily with the provided dependency Injection system and the test utilities.
Run your server using any GraphQL server, like the well known Apollo Server.
What does it look like ?
The goal of AeroGraphQL is to automaticly create the GraphQL schema while you write your Typescript business objects, so you don’t need to maintain a separate GraphQL schema definition aside of their implementations.
First, define your schema object’s types using Typescript annotation:
1 | 'User' } ) ( { name: |
Then implement your resolver:
1 | 'RootQuery' } ) ( { name: |
Compose your Schema:
1 | ( { |
Then inject this schema in your favorite GraphQL server.
Apollo Server with Express in this case:
1 | let mySchema = new MySchema(); |
This server will expose the following GraphQL schema:
1 | type User { |
With each resolvers automaticaly wired to their implementations.
Where to go next ?
Follow the Getting started guide to learn more about AeroGraphQL !
or
Checkout the API references.