From c8a316b430b0c7003ba2edcc4caf6a9e0a738db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lytek?= Date: Fri, 7 Jun 2024 12:40:40 +0200 Subject: [PATCH] Revert "Prevent subsequent build of metadata storage" This reverts commit cc94f9798fc9e3e14053d04765eff9d0735100cb. --- src/metadata/metadata-storage.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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[]) {