Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ This page introduces the `Prisma.validator` and offers some motivations behind w

</TopBlock>

> **Note**: If you have a use case for `Prisma.validator`, be sure to check out this [blog post](https://www.prisma.io/blog/satisfies-operator-ur8ys8ccq7zb) about improving your Prisma Client workflows with the new TypeScript `satisfies` keyword. It's likely that you can solve your use case natively using `satisfies` instead of using `Prisma.validator`.

:::warning
The `Prisma.validator` API is only available when using the **legacy** `prisma-client-js` generator. It’s **not supported** in the new `prisma-client` generator.

In most cases, you can achieve the same behavior using TypeScript’s native `satisfies` operator instead of `Prisma.validator`.

If you previously used `Prisma.validator`, check out this [blog post](https://www.prisma.io/blog/satisfies-operator-ur8ys8ccq7zb) to learn how the new `satisfies` keyword can improve and simplify your Prisma Client workflows.
:::
## Creating a typed query statement

Let's imagine that you created a new `userEmail` object that you wanted to re-use in different queries throughout your application. It's typed and can be safely used in queries.
Expand Down
Loading