File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ export class MetadataStorage {
80
80
81
81
params : ParamMetadata [ ] = [ ] ;
82
82
83
+ private hasAlreadyBeenBuilt = false ;
84
+
83
85
collectQueryHandlerMetadata ( definition : ResolverMetadata ) {
84
86
this . queries . push ( definition ) ;
85
87
}
@@ -174,6 +176,12 @@ export class MetadataStorage {
174
176
}
175
177
176
178
build ( options : SchemaGeneratorOptions ) {
179
+ if ( this . hasAlreadyBeenBuilt ) {
180
+ return ;
181
+ }
182
+
183
+ this . hasAlreadyBeenBuilt = true ;
184
+
177
185
this . classDirectives . reverse ( ) ;
178
186
this . fieldDirectives . reverse ( ) ;
179
187
this . argumentDirectives . reverse ( ) ;
@@ -214,10 +222,11 @@ export class MetadataStorage {
214
222
this . argumentDirectives = [ ] ;
215
223
this . classExtensions = [ ] ;
216
224
this . fieldExtensions = [ ] ;
217
-
218
225
this . resolverClasses = [ ] ;
219
226
this . fields = [ ] ;
220
227
this . params = [ ] ;
228
+
229
+ this . hasAlreadyBeenBuilt = false ;
221
230
}
222
231
223
232
private buildClassMetadata ( definitions : ClassMetadata [ ] ) {
You can’t perform that action at this time.
0 commit comments