1// https://github.com/MichalLytek/type-graphql/blob/master/docs/dependency-injection.md
2
3import { buildSchema } from "type-graphql";
4// import your IoC container
5import { Container } from "typedi";
6
7import { SampleResolver } from "./resolvers";
8
9// build the schema as always
10const schema = await buildSchema({
11 resolvers: [SampleResolver],
12 // register the 3rd party IOC container
13 container: Container,
14});