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

Prisma Client Extension: support Prisma.validator #18943

Closed
Tracked by #19416
KATT opened this issue Apr 26, 2023 · 2 comments · Fixed by #19698
Closed
Tracked by #19416

Prisma Client Extension: support Prisma.validator #18943

KATT opened this issue Apr 26, 2023 · 2 comments · Fixed by #19698
Assignees
Labels
kind/feature A request for a new feature. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: clientExtensions
Milestone

Comments

@KATT
Copy link

KATT commented Apr 26, 2023

I got asked to make a feature request by @millsp #15074 (comment)

I always define a select: when doing queries (because otherwise we get the equivalent of select *), and want to do the equivalent to the below but with my default prisma client:

const postSelect = Prisma.validator<Prisma.PostSelect>()({
  // ..
})

Originally posted by @KATT in #15074 (comment)

@jkomyno jkomyno added tech/typescript Issue for tech TypeScript. team/client Issue for team Client. kind/feature A request for a new feature. labels Apr 28, 2023
@janpio
Copy link
Member

janpio commented May 26, 2023

Internal Note: This can not happen like this, but needs a workaround via an extension - which we should document.

@millsp
Copy link
Member

millsp commented Jun 13, 2023

We've worked on a PR that expands the capabilities of Prisma.validator to bring a more natural API while also working with any client (be it extended or non-extended). Feedback welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for a new feature. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: clientExtensions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants