This folder consists of simple examples showing how to use different TypeGraphQL
features and how well it integrates with 3rd party libraries.
All examples have an examples.graphql
file with sample queries/mutations/subscriptions that you can execute.
Note: Be aware that the examples on master branch are designed to work with latest codebase that might not be released yet. So if you are looking for examples that are compatible with the version you use, just browse the files by the git tag, e.g.
tree/v0.16.0
for0.16.0
release.
- Enums and unions
- Subscriptions (simple)
- Subscriptions (using Redis)
- Interfaces
- Extensions (metadata)
- Dependency injection (IoC container)
- Authorization
- Validation
- Types inheritance
- Resolvers inheritance
- Generic types
- Mixin classes
- Middlewares and custom decorators
- Query complexity
- TypeORM (manual, synchronous) *
- TypeORM (automatic, lazy relations) *
- MikroORM
- Typegoose
- Apollo federation
- Apollo Cache Control
- Apollo Client local state
* Note that you need to edit the TypeORM
examples index.ts
with credentials to your local database