File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable unicorn/no-array-for-each */
2
+ import debug from 'debug' ;
2
3
import Schema from '../schema' ;
3
4
import * as typesCodegen from './types' ;
4
5
import * as tsCodegen from './typescript' ;
@@ -280,6 +281,13 @@ export default class SchemaCodeGenerator {
280
281
}
281
282
282
283
_generateEntityFieldGetter ( _entityDef : ObjectTypeDefinitionNode , fieldDef : FieldDefinitionNode ) {
284
+ const isDerivedField = this . _isDerivedField ( fieldDef ) ;
285
+ const codegenDebug = debug ( 'codegen' ) ;
286
+ if ( isDerivedField ) {
287
+ codegenDebug ( `Generating derived field getter for ${ fieldDef . name . value } ` ) ;
288
+ return this . _generateDerivedFieldGetter ( _entityDef , fieldDef ) ;
289
+ }
290
+
283
291
const name = fieldDef . name . value ;
284
292
const gqlType = fieldDef . type ;
285
293
const fieldValueType = this . _valueTypeFromGraphQl ( gqlType ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments