Closed samrocksc closed 8 months ago
@samrocksc are you on prisma 5.1.1? They introduced some type renaming in one of the latest updates.
Prisma 4.16.1 and then I tried with 5, but the same issue happens, i can try a few other configurations.
did you specifically try prisma 5.1.1
? this fixed the issue in this case
It seems prisma
introduced more breaking changes in their typings from 4.x.x.
to 5.1.1
that I need to be aware of and that need to be stated in the docs.
EDIT: It is mentioned in the 5.1 release that they changed the name auf some args
to DefaultArgs
as mentioned in the release notes
I need to catch up on how everything works, would be nice to be able to contribute back on this...it's a really nice application. I'll lock into 5.0 next time
I just realized that changing the behaviour to meet the type requirements of prisma 5.1.1
introduced bugs in prior versions. I need to dig into this a bit on the weekend to get this sorted out.
Updating versions I've tried this with and whether it fails or not for you.
In the code referenced above, is the version of prisma passed into that function anywhere? We could just do a version check and apply backwards. I still haven't had a chance to peak at this.
I implemented a version check yesterday in 2.7.9 but haven't testes it with a monorepo yet. it shoud work in a standard project where the package.json is located in the working directory.
works fine ;o) By the way, just tested it. In the future I'll be able to PR against these.
closing since this should not be a problem anymore with the current versions of the generator and prisma
Overview
I am having an issue with
Args
vs.DefaultArgs
Versions used
Schema
Unexpected Behavior
code causing this
I am just not familiar enough with how things are getting written to really be able to fix this right now. I'll try and dig into it this weekend.
Does anyone have a work around or anything? Really excited about the library, but this bug kind of makes it unusable with barrelfiles or in a single file unfortunately.
I found the culprit here: I'll have to dig into it and find out
https://github.com/chrishoermann/zod-prisma-types/blob/ac87ff3a1a8bebf121176c6229877c6aeb23115f/packages/generator/src/functions/contentWriters/writeArgs.ts#L36
Now what's interesting is I can just use
PostArgs
and everything works as intended! So we're already close to the fix.