diff --git a/packages/graphql/typegraphql/src/services/TypeGraphQLService.ts b/packages/graphql/typegraphql/src/services/TypeGraphQLService.ts index 75d26a3bb71..bacc95c03ad 100644 --- a/packages/graphql/typegraphql/src/services/TypeGraphQLService.ts +++ b/packages/graphql/typegraphql/src/services/TypeGraphQLService.ts @@ -47,7 +47,7 @@ export class TypeGraphQLService { const resolvers: any = this.getResolvers(id, [...(initialResolvers as any[]), ...(buildSchemaOptions.resolvers || [])]); const schema = await this.createSchema({ - container: this.injector, + container: this.injector as never, ...buildSchemaOptions, resolvers, globalMiddlewares: [ContextMiddleware, ...(buildSchemaOptions.globalMiddlewares || [])]