-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setting `emitESM=true` in the generator's configuration will switch from using `require` to `import` calls in the generated code. I haven't been successful in actually using the ESM output. Bi-directional relationships between models lead to circular dependencies in `*WhereInput` and `*ListRelationFilter` and cause the following error at start-up: > ReferenceError: Cannot access 'FooWhereInput' before initialization > at file:///app/node_modules/@generated/type-graphql/resolvers/inputs/FooListRelationFilter.js:10:31 Regardless of ESM setting, create a package.json if generating into node_modules. This makes sure that the generated code doesn't inherit a parent package's `type`.
- Loading branch information
Showing
12 changed files
with
201 additions
and
51 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.