Closed renovate[bot] closed 2 months ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 2fed74d82a6df5df80bc3659eb6634a464b7fec1:
Sandbox | Source |
---|---|
@keystone-6/sandbox | Configuration |
This PR contains the following updates:
5.12.1
->5.13.0
5.12.1
->5.13.0
5.12.1
->5.13.0
5.12.1
->5.13.0
Release Notes
prisma/prisma (@prisma/client)
### [`v5.13.0`](https://togithub.com/prisma/prisma/releases/tag/5.13.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.12.1...5.13.0) Today, we are excited to share the `5.13.0` stable release 🎉 🌟 **Help us spread the word about Prisma by starring the repo or [posting on X](https://twitter.com/intent/post?text=Check%20out%20the%20latest%20%40prisma%20release%20v5.13.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps%3A%2F%2Fgithub.com%2Fprisma%2Fprisma%2Freleases%2Ftag%2F5.13.0) about the release.** ##### Highlights ##### `omit` fields from Prisma Client queries (Preview) We’re excited to announce Preview support for the `omit` option within the Prisma Client query options. The [highly-requested](https://togithub.com/prisma/prisma/issues/5042) `omit` feature now allows you to exclude fields that you don’t want to retrieve from the database on a ***per-query basis*.** By default, when a query returns records, the result includes all scalar fields of the models defined in the Prisma schema. [`select`](https://www.prisma.io/docs/orm/reference/prisma-client-reference#select) can be used to return specific fields, while `omit` can now be used to exclude specific fields. `omit` lives at the same API level and works on all of the same [Prisma Client model queries](https://www.prisma.io/docs/orm/reference/prisma-client-reference#model-queries) as `select`. Note, however, that `omit` and `select` are mutually exclusive. In other words, you can’t use both in the same query. To get started using `omit`, enable the `omitApi` Preview feature in your Prisma schema: ```prisma // schema.prisma generator client { provider = "prisma-client-js" previewFeatures = ["omitApi"] } ``` Be sure to re-generate Prisma Client afterwards: ```bash npx prisma generate ``` Here is an example of using `omit`: ```ts // Includes all fields except password await prisma.user.findMany({ omit: { password: true }, }) ``` Here is an example of using `omit` with `include`: ```ts // Includes all user fields except user's password and title of user's posts await prisma.user.findMany({ omit: { password: true }, include: { posts: { omit: { title: true }, }, }, }) ```Expand to view the example Prisma schema
```prisma model User { id Int @id @default(autoincrement()) email String @unique name String? password String posts Post[] } model Post { id Int @id @default(autoincrement()) title String author User @relation(fields: [authorId], references: [id]) authorId Int } ```Configuration
📅 Schedule: Branch creation - "before 7am on Tuesday,before 7am on Wednesday" in timezone Australia/Sydney, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.