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

fix(fieldRef): generic args in ts client #3989

Merged
merged 2 commits into from
May 26, 2023
Merged

Conversation

Weakky
Copy link
Member

@Weakky Weakky commented May 22, 2023

Overview

It's hard to connect the changes to the actual fix. Setting the WhereInputType object tag to the WhereUniqueInput object types allows the DMMF renderer to add a meta: { source: "<model_name>" } property to the input object types, which the client eventually use to decide whether or not a generic is needed for the generated TypeScript types.

What happened is that we first implemented field refs, then we implemented the extendedWhereUnique feature, but forgot to add the required tag to WhereUnique input objects, which made both features incompatible.

@Weakky Weakky requested a review from a team May 22, 2023 13:37
@codspeed-hq
Copy link

codspeed-hq bot commented May 22, 2023

CodSpeed Performance Report

Merging #3989 fix/where-uniq-generic (e96eb77) will not alter performances.

Summary

🔥 0 improvements
❌ 0 regressions
✅ 11 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

@Weakky Weakky added this to the 4.15.0 milestone May 26, 2023
@Weakky Weakky merged commit 8fbc245 into main May 26, 2023
29 checks passed
@Weakky Weakky deleted the fix/where-uniq-generic branch May 26, 2023 14:36
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.

Cannot find name '$PrismaModel' due to feature extendedWhereUnique with preview feature fieldReference
1 participant