Draft
Conversation
- upgraded @prisma/client from 4.15.0 to ^5.22.0 - upgraded prisma from 4.15.0 to ^5.22.0 - upgraded typegraphql-prisma from 0.26.0 to 0.27.0
…ction for clarity
Jonasdoubleyou
approved these changes
Dec 19, 2025
| 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; |
Member
There was a problem hiding this comment.
Maybe we should rather switch NotificationUpdateInput to our own type?
Contributor
Author
There was a problem hiding this comment.
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 |
Member
There was a problem hiding this comment.
(strange, let me check whether I find a TS hack to make this work)
Contributor
Author
There was a problem hiding this comment.
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 😅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.