Skip to content

Chore: Update prisma to v5#1334

Draft
JeangelLF wants to merge 13 commits intomasterfrom
chore/update-dependencies
Draft

Chore: Update prisma to v5#1334
JeangelLF wants to merge 13 commits intomasterfrom
chore/update-dependencies

Conversation

@JeangelLF
Copy link
Contributor

@JeangelLF JeangelLF commented Dec 18, 2025

Ticket

https://github.com/corona-school/project-user/issues/1572

What was done?

Following this guide, I tried to upgrade our prisma version to the v5.

This also included updating some other packages, which lead to extra adjustments in some parts of the code.

We're still 2 major versions behind in prisma ... but it seems that due to typegraphql-prisma being no longer updated , the following upgrades are probably way trickier than this one.

@realmayus realmayus temporarily deployed to backend-chore-update-de-gvehjl December 18, 2025 13:35 Inactive
throw new Error(`Invalid HookID`);
export async function update(id: NotificationID, values: Partial<Omit<Prisma.notificationUpdateInput, 'active'>>) {
if (values.hookID) {
const hookID = typeof values.hookID === 'string' ? values.hookID : values.hookID.set;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should rather switch NotificationUpdateInput to our own type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I thought this was fine because Prisma just added that these type of fields could be passed directly as a string or with the set 🤷

export async function updateStudentScreening(type: StudentScreeningType, screeningId: number, data: Partial<ScreeningInput>, screenerId?: number) {
const screeningModel = type === 'instructor' ? prisma.instructor_screening : prisma.screening;
const screeningModelLabel = type === 'instructor' ? 'InstructorScreening' : 'TutorScreening';
// @ts-expect-error Both models have the same shape, so this should work fine
Copy link
Member

Choose a reason for hiding this comment

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

(strange, let me check whether I find a TS hack to make this work)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if you were able to find something. If we don't want these @ts-expect-error around I could also rewrite the code to not use that what TS doesn't like 😅

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.

3 participants