Skip to content

Commit 76d7bcf

Browse files
authored
Merge pull request #116 from MinJungHyun/patch-1
maybe enum path error
2 parents 2e4ff13 + 76bf41c commit 76d7bcf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/generator/src/generator/generateCommonEnums.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ export const generateCommonEnums = (dmmfDocument: DmmfDocument, project: Project
1212
sourceFile.addImportDeclaration({ moduleSpecifier: '@nestjs/graphql', namespaceImport: 'NestJsGraphQL' })
1313

1414
const datamodelEnumNames = dmmfDocument.datamodel.enums.map((enumDef) => enumDef.typeName)
15+
datamodelEnumNames.forEach((enumDef) => {
16+
sourceFile.addStatements([
17+
`export * from "../enums/${enumDef}.enum";`
18+
])
19+
})
1520
dmmfDocument.schema.enums
1621
// skip enums from datamodel
1722
.filter((enumDef) => !datamodelEnumNames.includes(enumDef.typeName))

0 commit comments

Comments
 (0)