File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,7 @@ For example:
372
372
model Product {
373
373
/// Old description
374
374
/// @deprecated Use new name instead
375
+ /// @complexity 1
375
376
oldName String
376
377
}
377
378
```
@@ -388,6 +389,7 @@ export class Product {
388
389
@Field (() => String , {
389
390
description: ' Old description' ,
390
391
deprecationReason: ' Use new name instead' ,
392
+ complexity: 1
391
393
})
392
394
oldName: string ;
393
395
}
Original file line number Diff line number Diff line change @@ -184,6 +184,16 @@ function createSettingElement({
184
184
185
185
return result ;
186
186
}
187
+
188
+ if ( line . startsWith ( '@complexity' ) ) {
189
+ let n = Number . parseInt ( trim ( line . slice ( 11 ) ) ) ;
190
+ if ( n !== n || n < 1 ) n = 1 ;
191
+ fieldElement . arguments ! [ 'complexity' ] = n ;
192
+
193
+ result . element = fieldElement ;
194
+
195
+ return result ;
196
+ }
187
197
188
198
const name = match ?. groups ?. name ;
189
199
You can’t perform that action at this time.
0 commit comments