diff --git a/src/metadata/metadata-storage.ts b/src/metadata/metadata-storage.ts index b0faa99dc..9083f7ec1 100644 --- a/src/metadata/metadata-storage.ts +++ b/src/metadata/metadata-storage.ts @@ -80,8 +80,6 @@ export class MetadataStorage { params: ParamMetadata[] = []; - private hasAlreadyBeenBuilt = false; - collectQueryHandlerMetadata(definition: ResolverMetadata) { this.queries.push(definition); } @@ -176,12 +174,6 @@ export class MetadataStorage { } build(options: SchemaGeneratorOptions) { - if (this.hasAlreadyBeenBuilt) { - return; - } - - this.hasAlreadyBeenBuilt = true; - this.classDirectives.reverse(); this.fieldDirectives.reverse(); this.argumentDirectives.reverse(); @@ -222,11 +214,10 @@ export class MetadataStorage { this.argumentDirectives = []; this.classExtensions = []; this.fieldExtensions = []; + this.resolverClasses = []; this.fields = []; this.params = []; - - this.hasAlreadyBeenBuilt = false; } private buildClassMetadata(definitions: ClassMetadata[]) {