Skip to content
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

Upgraded to prisma 5.11.0 #210

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Upgraded to prisma 5.11.0 #210

wants to merge 2 commits into from

Conversation

radarsu
Copy link

@radarsu radarsu commented Mar 20, 2024

Major changes

  • Prisma added ReadonlyDeep type which was causing TypeScript to throw errors. To counter that I mapped types with WritableDeep from type-fest library.
  • Prisma AND and NOT fields now also allow single element instead of an Array, which was causing incompatibility between prisma and generators.
  • Prisma relation fields are now XOR of RelationField and WhereInput.

Comment on lines +26 to +37
if (t.endsWith(`RelationFilter`)) {
let whereInput;
if (isList) {
whereInput = whereInput.replace(`RelationFilter`, `WhereInput`);
} else {
whereInput = t.replace(`ListRelationFilter`, `WhereInput`);
}

return `XOR<InstanceType<typeof ${t}>, ${whereInput}>`;
}

return `InstanceType<typeof ${t}>`;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this?
You can control type by using setting useInputType_

@unlight
Copy link
Owner

unlight commented May 19, 2024

I just upgraded to 5.14.
I see other changes, but I do not see any compatibility issues.

@unlight
Copy link
Owner

unlight commented May 19, 2024

tests should pass

@unlight unlight marked this pull request as draft May 19, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants