Skip to content

update: support prisma version 6.19#494

Open
anyuan-chen wants to merge 3 commits intoMichalLytek:mainfrom
anyuan-chen:main
Open

update: support prisma version 6.19#494
anyuan-chen wants to merge 3 commits intoMichalLytek:mainfrom
anyuan-chen:main

Conversation

@anyuan-chen
Copy link
Copy Markdown

@anyuan-chen anyuan-chen commented Mar 3, 2026

This PR updates the DMMF generation to support DMMF outputted from Prisma 6.19. It also adds supports for the new clients and aliasing Prisma introduced since ver 5.

I use this project as part of Hack the North, a student run hackathon, and our backend is coupled extremely tightly to this framework and GQL as a whole. We've been on Prisma 5 for a while and would like to move to Prisma 6, which is why I am sending this patch.

I spent a decent amount of time reading DMMF and this repo to familarize myself with the general structure/logic behind generation, so I could police my coding agent when I was using it.

AI Usage:

This final PR was constructed with the help of agents, with careful and thoughtful human supervision.
My approach was to find the 2 commits where Prisma 5 left off, then find out where 6.19 was. For each of the commits, I asked the agent to collect the changes in the DMMF, and write it to a SQL db with the commit hash. I then had another coding agent go over each of those hashes and scan this repo for areas where it could apply changes.

I then confirmed the changes myself by hand in the main Prisma repo by looking at the PRs. I looked for tests to add where I felt appropriate, and instructed the agent to add them.

I did not update experiments or examples.

cwdDirPath + "/generated/type-graphql",
);

expect(prismaGenerateResult.stderr).toHaveLength(0);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

.replace("UpdateMany", "")
.replace("AndReturnOutputType", ""),
);
return `UpdateManyAndReturn${modelTypeName}`;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

createOneUser(data: UserCreateInput): User!
deleteManyPost(where: PostWhereInput): AffectedRowsOutput!
deleteManyUser(where: UserWhereInput): AffectedRowsOutput!
deleteManyPost(limit: Int, where: PostWhereInput): AffectedRowsOutput!
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

updateManyUser(data: UserUpdateManyMutationInput!, where: UserWhereInput): AffectedRowsOutput!
updateManyAndReturnPost(data: PostUpdateManyMutationInput!, limit: Int, where: PostWhereInput): [UpdateManyAndReturnPost!]!
updateManyAndReturnUser(data: UserUpdateManyMutationInput!, limit: Int, where: UserWhereInput): [UpdateManyAndReturnUser!]!
updateManyPost(data: PostUpdateManyMutationInput!, limit: Int, where: PostWhereInput): AffectedRowsOutput!
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@anyuan-chen
Copy link
Copy Markdown
Author

@MichalLytek Please take a look!

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.

1 participant