You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I forked this repo for my own personal use case and stumbled upon some issues when attempting to upgrade to prisma 5.1.1
Just wanted to leave some notes here of findings thus far.
Feel free to take it over.
[...]CountOutputTypeArgs types have been renamed e.g. AddressCountOutputTypeArgs becomes AddressCountOutputTypeDefaultArgs
Added this after the isAggregateInputType check in Transformer.generateExportObjectSchemaStatement
Is now wrapped with a AtLeast<> type utility that requires at least one of the values to be present instead of them all being optional. This conflicts with the the ZodType argument in these type of files:
I narrowed it down to the fact that extendedWhereUnique is enabled by default in prisma 5.
Here's a related issue to watch: prisma/prisma#20619
I don't know if there's an answer to this with zod?
I don't fully understand the code and how it's all laid out so I got a bit overwhelmed and tapped out, but hopefully this helps if you decide to keep supporting this package (which you should! it's great!)
The text was updated successfully, but these errors were encountered:
Found a potential solution to Prisma's AtLeast type helper in zod: https://stackoverflow.com/a/73294947
Will try and implement it when I get time, leaving here for later.
I forked this repo for my own personal use case and stumbled upon some issues when attempting to upgrade to prisma 5.1.1
Just wanted to leave some notes here of findings thus far.
Feel free to take it over.
[...]CountOutputTypeArgs
types have been renamed e.g.AddressCountOutputTypeArgs
becomesAddressCountOutputTypeDefaultArgs
Added this after the
isAggregateInputType
check inTransformer.generateExportObjectSchemaStatement
The one I got stuck on after that was the
[...]WhereUniqueInput
types.So where previously a type might look like
Is now wrapped with a
AtLeast<>
type utility that requires at least one of the values to be present instead of them all being optional. This conflicts with the theZodType
argument in these type of files:I narrowed it down to the fact that
extendedWhereUnique
is enabled by default in prisma 5.Here's a related issue to watch: prisma/prisma#20619
I don't know if there's an answer to this with zod?
I don't fully understand the code and how it's all laid out so I got a bit overwhelmed and tapped out, but hopefully this helps if you decide to keep supporting this package (which you should! it's great!)
The text was updated successfully, but these errors were encountered: