-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fields with undefined values present in args of generated types #435
Conversation
if the intent is to not have undefined values at runtime for unspecified request keys, should |
@MichalLytek -- are you open to this PR? our team reverted to 0.27.0 due to the above but we're really missing the speed boost that came with 0.27.1 :) |
I found this to be a workaround. I need to play with es2022 in typegraphql core itself I've recently merged there a fix to get rid of undefined values from transformed inputs. |
@MichalLytek any updates on this issue? |
@shawnjones253
I think I will just downgrade target in prisma generator to make it matching with type-graphql core. |
Closing as superseded by 4c053cc 🔒 |
@MichalLytek now could I just bug you for a new release 😅 |
@MichalLytek sorry to nag -- making another plea for a release -- our team is eager to get back to the fast version as it saves us hundreds of seconds when generating typegraphql types |
fix for: #434
This restores the previous behavior of input keys only being set when specified by the api request via
variables
.Unfortunately, this only guarantees a fix when
emitTranspiledCode = true
is used (the default). However, ifoutput = 'someDirOutsideOfNodeModules'
is used WITHOUTemitTranspiledCode = true
, then the consuming app must do one of:"useDefineForClassFields": false
if target == es2022UseDefineForClassFields
Default: true if [target](https://www.typescriptlang.org/tsconfig#target) is ES2022 or higher, including ESNext; false otherwise.
some interesting reading that pointed me in this direction:
swc-project/swc#7055
microsoft/TypeScript#45995