apollographql/apollo-server (@apollo/server)
### [`v4.9.1`](https://togithub.com/apollographql/apollo-server/blob/HEAD/packages/server/CHANGELOG.md#491)
[Compare Source](https://togithub.com/apollographql/apollo-server/compare/@apollo/server@4.9.0...@apollo/server@4.9.1)
##### Patch Changes
- [#7672](https://togithub.com/apollographql/apollo-server/pull/7672) [`ebfde0007`](https://togithub.com/apollographql/apollo-server/commit/ebfde0007c647d9fb73e3aa24b968def3e307084) Thanks [@trevor-scheer](https://togithub.com/trevor-scheer)! - Add missing `nonce` on `script` tag for non-embedded landing page
### [`v4.9.0`](https://togithub.com/apollographql/apollo-server/blob/HEAD/packages/server/CHANGELOG.md#490)
[Compare Source](https://togithub.com/apollographql/apollo-server/compare/@apollo/server@4.8.1...@apollo/server@4.9.0)
##### Minor Changes
- [#7617](https://togithub.com/apollographql/apollo-server/pull/7617) [`4ff81ca50`](https://togithub.com/apollographql/apollo-server/commit/4ff81ca508d46eaafa4aa7c265cf2ba2c4421524) Thanks [@trevor-scheer](https://togithub.com/trevor-scheer)! - Introduce new `ApolloServerPluginSubscriptionCallback` plugin. This plugin implements the [subscription callback protocol](https://togithub.com/apollographql/router/blob/dev/dev-docs/callback_protocol.md) which is used by Apollo Router. This feature implements subscriptions over HTTP via a callback URL which Apollo Router registers with Apollo Server. This feature is currently in preview and is subject to change.
You can enable callback subscriptions like so:
```ts
import { ApolloServerPluginSubscriptionCallback } from '@apollo/server/plugin/subscriptionCallback';
import { ApolloServer } from '@apollo/server';
const server = new ApolloServer({
// ...
plugins: [ApolloServerPluginSubscriptionCallback()],
});
```
Note that there is currently no tracing or metrics mechanism in place for callback subscriptions. Additionally, this plugin "intercepts" callback subscription requests and bypasses some of Apollo Server's internals. The result of this is that certain plugin hooks (notably `executionDidStart` and `willResolveField`) will not be called when handling callback subscription requests or when sending subscription events.
For more information on the subscription callback protocol, visit the docs:
https://www.apollographql.com/docs/router/executing-operations/subscription-callback-protocol/
##### Patch Changes
- [#7659](https://togithub.com/apollographql/apollo-server/pull/7659) [`4784f46fb`](https://togithub.com/apollographql/apollo-server/commit/4784f46fb580cdcd4359a86180def7d221856480) Thanks [@renovate](https://togithub.com/apps/renovate)! - Update graphql-http dependency
### [`v4.8.1`](https://togithub.com/apollographql/apollo-server/blob/HEAD/packages/server/CHANGELOG.md#481)
[Compare Source](https://togithub.com/apollographql/apollo-server/compare/@apollo/server@4.8.0...@apollo/server@4.8.1)
##### Patch Changes
- [#7636](https://togithub.com/apollographql/apollo-server/pull/7636) [`42fc65cb2`](https://togithub.com/apollographql/apollo-server/commit/42fc65cb282a8d5b8bf853775a8eedc421d33524) Thanks [@trevor-scheer](https://togithub.com/trevor-scheer)! - Update test suite for compatibility with Node v20
### [`v4.8.0`](https://togithub.com/apollographql/apollo-server/blob/HEAD/packages/server/CHANGELOG.md#480)
[Compare Source](https://togithub.com/apollographql/apollo-server/compare/@apollo/server@4.7.5...@apollo/server@4.8.0)
##### Minor Changes
- [#7634](https://togithub.com/apollographql/apollo-server/pull/7634) [`f8a8ea08f`](https://togithub.com/apollographql/apollo-server/commit/f8a8ea08fed4090115b1a025e57bdb0f2deb82fc) Thanks [@dfperry5](https://togithub.com/dfperry5)! - Updating the ApolloServer constructor to take in a stringifyResult function that will allow a consumer to pass in a function that formats the result of an http query.
Usage:
```ts
const server = new ApolloServer({
typeDefs,
resolvers,
stringifyResult: (value: FormattedExecutionResult) => {
return JSON.stringify(value, null, 2);
},
});
```
aws/aws-sdk-js-v3 (@aws-sdk/client-lambda)
### [`v3.388.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33880-2023-08-09)
[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.387.0...v3.388.0)
**Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda)
### [`v3.387.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33870-2023-08-08)
[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.386.0...v3.387.0)
##### Features
- **clients:** allow client creation without configuration ([#5060](https://togithub.com/aws/aws-sdk-js-v3/issues/5060)) ([a9723dc](https://togithub.com/aws/aws-sdk-js-v3/commit/a9723dcbbf970402a3131a8ff79153a04b2cfb89))
### [`v3.386.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33860-2023-08-07)
[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.385.0...v3.386.0)
**Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda)
### [`v3.385.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33850-2023-08-04)
[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.382.0...v3.385.0)
**Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda)
### [`v3.382.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33820-2023-08-01)
[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.379.1...v3.382.0)
**Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda)
#### [3.379.1](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.379.0...v3.379.1) (2023-07-28)
**Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda)
### [`v3.379.1`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33791-2023-07-28)
[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.378.0...v3.379.1)
**Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda)
### [`v3.378.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33780-2023-07-26)
[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.377.0...v3.378.0)
**Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda)
### [`v3.377.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33770-2023-07-25)
[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.370.0...v3.377.0)
##### Features
- **client-lambda:** Add Python 3.11 (python3.11) support to AWS Lambda ([08e0f30](https://togithub.com/aws/aws-sdk-js-v3/commit/08e0f308c3c2dbaa863d6d3ebb912db5fadd90ad))
conventional-changelog/commitlint (@commitlint/cli)
### [`v17.7.1`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/cli/CHANGELOG.md#1771-2023-08-10)
[Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.7.0...v17.7.1)
**Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli)
### [`v17.7.0`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/cli/CHANGELOG.md#1770-2023-08-09)
[Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0)
**Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli)
#### [17.6.7](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19)
**Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli)
#### [17.6.6](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.5...v17.6.6) (2023-06-24)
**Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli)
#### [17.6.5](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.4...v17.6.5) (2023-05-30)
**Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli)
#### [17.6.3](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.2...v17.6.3) (2023-05-04)
**Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli)
#### [17.6.1](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.0...v17.6.1) (2023-04-14)
**Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli)
### [`v17.6.7`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/cli/CHANGELOG.md#1767-2023-07-19)
[Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7)
**Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli)
conventional-changelog/commitlint (@commitlint/config-conventional)
### [`v17.7.0`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/config-conventional/CHANGELOG.md#1770-2023-08-09)
[Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0)
**Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional)
#### [17.6.7](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19)
**Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional)
#### [17.6.6](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.5...v17.6.6) (2023-06-24)
**Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional)
#### [17.6.5](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.4...v17.6.5) (2023-05-30)
**Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional)
#### [17.6.3](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.2...v17.6.3) (2023-05-04)
**Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional)
#### [17.6.1](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.0...v17.6.1) (2023-04-14)
**Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional)
### [`v17.6.7`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/config-conventional/CHANGELOG.md#1767-2023-07-19)
[Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7)
**Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional)
ardatan/graphql-tools (@graphql-tools/utils)
### [`v10.0.5`](https://togithub.com/ardatan/graphql-tools/blob/HEAD/packages/utils/CHANGELOG.md#1005)
[Compare Source](https://togithub.com/ardatan/graphql-tools/compare/@graphql-tools/utils@10.0.4...@graphql-tools/utils@10.0.5)
##### Patch Changes
- [`a59fb765`](https://togithub.com/ardatan/graphql-tools/commit/a59fb765a1256b914f1728283d793d61b66bdf89)
Thanks [@ardatan](https://togithub.com/ardatan)! - Optimizations to get better performance in query
planning
### [`v10.0.4`](https://togithub.com/ardatan/graphql-tools/blob/HEAD/packages/utils/CHANGELOG.md#1004)
[Compare Source](https://togithub.com/ardatan/graphql-tools/compare/@graphql-tools/utils@10.0.3...@graphql-tools/utils@10.0.4)
##### Patch Changes
- [#5444](https://togithub.com/ardatan/graphql-tools/pull/5444)
[`c1afb545`](https://togithub.com/ardatan/graphql-tools/commit/c1afb5452d2df1e9fa5553ba024d77a00e0d9398)
Thanks [@kennyjwilli](https://togithub.com/kennyjwilli)! - Exports the `DirectableGraphQLObject`
type.
prisma/prisma (@prisma/client)
### [`v5.1.1`](https://togithub.com/prisma/prisma/releases/tag/5.1.1)
[Compare Source](https://togithub.com/prisma/prisma/compare/5.1.0...5.1.1)
Today, we are issuing the `5.1.1` patch release.
##### Fixes in Prisma Client
- [Browser bundle: Unhandled Runtime Error when upgrading to 5.1.0 from 5.0.0 ](https://togithub.com/prisma/prisma/issues/20480)
- [Prisma Client: `disconnect: true` does not appear to delete the foreign key in the returned data](https://togithub.com/prisma/prisma/issues/20491)
- [Prisma Client errors with "TypeError: Cannot create proxy with a non-object as target or handler" when using result client extension with no `needs` and `count` method](https://togithub.com/prisma/prisma/issues/20499)
### [`v5.1.0`](https://togithub.com/prisma/prisma/releases/tag/5.1.0)
[Compare Source](https://togithub.com/prisma/prisma/compare/5.0.0...5.1.0)
Today, we are excited to share the `5.1.0` stable release 🎉
🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v5.1.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.1.0) about the release.**
### Highlights
After two big releases where we released Client extensions for production usage ([`4.16.0`](https://togithub.com/prisma/prisma/releases/tag/4.16.0)) and made Prisma faster by default ([`5.0.0`](https://togithub.com/prisma/prisma/releases/tag/5.0.0)), we have focused on some smaller issues to make the experience with these new features even better.
#### Community contributions
Our community has been on the roll! We appreciate everyone who helps us by opening a GitHub issue or proposing a fix via Pull Requests. In this release, we're excited to highlight multiple community contributions:
- Fix IPv6 not working for relational databases: [https://github.com/prisma/prisma-engines/pull/4051](https://togithub.com/prisma/prisma-engines/pull/4051) by [@alula](https://togithub.com/alula)
- Middlewares: Add to `PrismaAction` type, missing `findUniqueOrThrow` and `findFirstOrThrow` [https://github.com/prisma/prisma/pull/17471](https://togithub.com/prisma/prisma/pull/17471) by [@mejiaej](https://togithub.com/mejiaej) and missing `groupBy` [https://github.com/prisma/prisma/pull/19985](https://togithub.com/prisma/prisma/pull/19985) by [@iurylippo](https://togithub.com/iurylippo)
- Better error message in currently non-supported runtimes like Browser or Vercel Edge Runtime [https://github.com/prisma/prisma/pull/20163](https://togithub.com/prisma/prisma/pull/20163) by [@andyjy](https://togithub.com/andyjy)
- Remove error messages for valid NixOS setups [https://github.com/prisma/prisma/pull/20138](https://togithub.com/prisma/prisma/pull/20138) by [@Gerschtli](https://togithub.com/Gerschtli)
#### Better performance: Fewer SQL queries on PostgreSQL & CockroachDB
In our continued and ongoing work to make Prisma faster, we identified some Prisma Client queries that led to multiple SQL statements being executed — although in specific databases, that was not necessary.
Hence we optimized our internal SQL generation for PostgreSQL and CockroachDB to generate more efficient SQL queries:
##### Simple `create` query
In a simple `create` query, `RETURNING` makes the second query and the transaction statements obsolete:
##### Prisma Client query
```ts
prisma.user.create({
data: { name: "Original name" }
})
```
##### Before v5.1.0
```sql
BEGIN
INSERT INTO "User" ("name") VALUES ($1) RETURNING "User"."id"
SELECT "User"."id", "User"."name" FROM "User" WHERE "User"."id" = $1;
COMMIT
```
##### 5.1.0 and later
```sql
-- Sends 1 statement (instead of 2) and omits the transaction
INSERT INTO "User" ("name") VALUES ($1) RETURNING "User"."id", "User"."name"
```
##### Simple `update` query
For a simple `update` query, `RETURNING` makes both additional queries and the transaction statements obsolete:
##### Prisma Client query
```ts
prisma.user.update({
where: { id: 1 },
data: { name: "updated" }
})
```
##### Before v5.1.0
```sql
BEGIN
SELECT id FROM "User" WHERE "User".id = 1;
UPDATE "User" SET name = 'updated' WHERE "User".id = 1;
SELECT id, name FROM "User" WHERE "User".id = 1;
COMMIT
```
##### 5.1.0 and later
```sql
-- Sends 1 statement (instead of 3) and omits the transaction
UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id, "User".name;
```
##### Simple `update` query, return with relation value
One `SELECT` query could easily be dropped in a simple `update` query that should return a relation value as well:
##### Prisma Client query
```ts
prisma.user.update({
where: { id: 1 },
data: { name: "updated" },
includes: { posts: true }
})
```
##### Before v5.1.0
```sql
BEGIN
SELECT id FROM "User" WHERE "User".id = 1;
UPDATE "User" SET name = 'updated' WHERE "User".id = 1;
SELECT id, name FROM "User" WHERE "User".id = 1;
SELECT id, title FROM "Post" WHERE "Post"."userId" = 1;
COMMIT
```
##### 5.1.0 and later
```sql
-- Sends 3 statements (instead of 4)
BEGIN
UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id;
SELECT id, name FROM "User" WHERE "User".id = 1;
SELECT id, title FROM "Post" WHERE "Post"."userId" = 1;
COMMIT
```
##### Empty `update` query
An empty `update` query can be optimized to skip the transaction and the second identical query by creating specific handling for this edge case in our code:
##### Prisma Client query
```ts
prisma.user.update({
where: { id: 1 },
data: {},
})
```
##### Before v5.1.0
```sql
BEGIN
SELECT id, name FROM "User" WHERE "User".id = 1;
SELECT id, name FROM "User" WHERE "User".id = 1;
COMMIT
```
##### 5.1.0 and later
```sql
-- Sends 1 statement (instead of 2) and omits the transaction
SELECT id, name FROM "User" WHERE "User".id = 1;
```
##### Simple + relation `update` query (but do not return relation value)
An update of both the model and its relation, we could drop 2 `SELECT` queries that we did before without ever using their return values:
##### Prisma Client query
```ts
prisma.user.update({
where: { id: 1 },
data: {
name: "updated",
posts: {
update: {
where: { id: 1 },
data: {
title: "updated"
}
}
}
}
})
```
##### Before v5.1.0
```sql
BEGIN
SELECT id, name FROM "User" WHERE "User".id = 1;
UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id;
SELECT "id", "postId" FROM "Post" WHERE "Post".id = 1;
UPDATE "Post" SET title = 'updated' WHERE "Post"."userId" = 1 AND "Post".id = 1;
SELECT id, name FROM "User" WHERE "User".id = 1;
COMMIT
```
##### 5.1.0 and later
```sql
-- Sends 3 statements (instead of 5)
BEGIN
UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id, "User".name;
SELECT "id", "postId" FROM "Post" WHERE "Post".id = 1;
UPDATE "Post" SET title = 'updated' WHERE "Post"."userId" = 1 AND "Post".id = 1;
COMMIT
```
In the next releases, we will continue optimizing Prisma Client queries to only run the minimal amount of SQL queries necessary.
If you notice any Prisma Client queries that are affected right now, please check the issues under [our `performance/queries` label](https://togithub.com/prisma/prisma/labels/topic%3A%20performance%2Fqueries). If you didn’t find one for what you’re seeing, please [create a new issue](https://togithub.com/prisma/prisma/issues). This will be super useful for us to understand all (edge) cases. Thank you!
#### Prisma Studio now supports `directUrl`
Our CLI command `prisma studio` that opens Prisma Studio now also can use the [`directUrl`](https://www.prisma.io/docs/guides/performance-and-optimization/connection-management#external-connection-poolers) property of the `datasource` block so you can make it talk to a different database than defined in `url`. This makes it easier to use Studio alongside the Prisma Data Proxy and [Accelerate](https://www.prisma.io/accelerate).
#### Prisma Client: No more type clashes
We fixed (almost) all cases where using a specific term as a model name in your Prisma Schema would lead to a *type clash* due to Prisma’s generated typings. As a result of a type clash, it was not possible to use that model in your code (this was e.g. the case if you named a model `Model` or `ModelUpdate`).
We also deprecated the `Args` type as part of that fix. Going forward, `DefaultArgs` should be used instead.
#### Fixes and improvements
##### Prisma Client
- [Reduce the number of generated SQL statements for Updates/Inserts](https://togithub.com/prisma/prisma/issues/5043)
- [\[v2.17.0\] Missing client TS types Aggregate\*Args](https://togithub.com/prisma/prisma/issues/5749)
- [Reduce transactions for writes](https://togithub.com/prisma/prisma/issues/5919)
- [Incorrect Include typings when having models called `X` and `XUpdate`](https://togithub.com/prisma/prisma/issues/7518)
- [Model named "Check" is incorrectly typed](https://togithub.com/prisma/prisma/issues/7655)
- [Models named Query cause an internal GraphQL Parse Error](https://togithub.com/prisma/prisma/issues/8153)
- [Naming an entity "Query" leads to an error](https://togithub.com/prisma/prisma/issues/9307)
- [Type name clash when `Model` and `ModelUpdate` is defined in the schema ](https://togithub.com/prisma/prisma/issues/9568)
- [Duplicate identifier 'CheckSelect'](https://togithub.com/prisma/prisma/issues/9669)
- [`@prisma/internals` (previously @prisma/sdk) uses deprecated dependencies `uuid@3.4.0` via `temp-write 4.0.0`](https://togithub.com/prisma/prisma/issues/11960)
- [naming a model `Datasource` breaks generated return types](https://togithub.com/prisma/prisma/issues/12332)
- [Certain `model` names cause clashes in generated types](https://togithub.com/prisma/prisma/issues/12469)
- [Type error on query with select field (although query runs successfully)](https://togithub.com/prisma/prisma/issues/15615)
- [`$extends` TS error: "Inferred type of this node exceeds the maximum length the compiler will serialize" with `"declaration": true` in `tsconfig`](https://togithub.com/prisma/prisma/issues/16536)
- [Update operation includes multiple where statements for the same fields](https://togithub.com/prisma/prisma/issues/16864)
- [Type conflict when naming a table {something} and a second table {something}Result ](https://togithub.com/prisma/prisma/issues/16940)
- [`Type '"findUniqueOrThrow"' is not assignable to type 'PrismaAction'`](https://togithub.com/prisma/prisma/issues/17470)
- [Naming a model `Promise` breaks types for `PrismaPromise`](https://togithub.com/prisma/prisma/issues/17542)
- [Prisma can't connect with an IPv6 host (on e.g. Fly.io)](https://togithub.com/prisma/prisma/issues/18079)
- [`include` not working on models ending with `...Update` with unique compound index](https://togithub.com/prisma/prisma/issues/18902)
- [Prisma Client: fixing type name clashes from generated client](https://togithub.com/prisma/prisma/issues/19811)
- [Prisma Client: wrong type when using spread operator to set default values on query args](https://togithub.com/prisma/prisma/issues/19962)
- [The generated updateArgs have no update attribute](https://togithub.com/prisma/prisma/issues/19967)
- [4.16.1 breaks type check](https://togithub.com/prisma/prisma/issues/19999)
- [`LogLevel` enum conflicts with built-in Prisma type](https://togithub.com/prisma/prisma/issues/20031)
- [Using `Prisma.XyzFindManyArgs` breaks `findMany` typing in v4.16.0+](https://togithub.com/prisma/prisma/issues/20093)
- [`this.$on("beforeExit")` doesn't work anymore on 5.0.0](https://togithub.com/prisma/prisma/issues/20171)
- [Wrong nullable types with fluent API in Prisma 5.0](https://togithub.com/prisma/prisma/issues/20183)
- [`Error: Unknown value type` on nested create](https://togithub.com/prisma/prisma/issues/20192)
- [Prisma 5.0 Migration `findUnique` on `@unique` columns that are enums](https://togithub.com/prisma/prisma/issues/20227)
- [`UpsertArgs` select field does not match type for `db..upsert(item)`](https://togithub.com/prisma/prisma/issues/20243)
- [TypeScript Error TS2322 when assigning JavaScript Date object to Prisma DateTime field](https://togithub.com/prisma/prisma/issues/20253)
- [npm install of Prisma CLI fails on preinstall with no logs when Node.js version is lower than minimum](https://togithub.com/prisma/prisma/issues/20260)
- [Types wrongly accept non-array parameter `by` in `groupBy` in 5.0.0](https://togithub.com/prisma/prisma/issues/20261)
- [CLI errors with `TypeError [ERR_INVALID_URL]: Invalid URL` when `HTTP(S)_PROXY` en var has is set to a URL without a protocol](https://togithub.com/prisma/prisma/issues/20302)
- [`tsc --watch` fails with `JavaScript heap out of memory` error](https://togithub.com/prisma/prisma/issues/20308)
- [Hovering over types (intellisense) shows confusing `GetResult`](https://togithub.com/prisma/prisma/issues/20320)
- [Internal query batching fails when the table name is 'stores'](https://togithub.com/prisma/prisma/issues/20324)
- [Client extensions result extensions should be applied after query extensions](https://togithub.com/prisma/prisma/issues/20437)
##### Prisma Studio
- [Use `directUrl` in `prisma studio`](https://togithub.com/prisma/prisma/issues/17358)
##### Language tools (e.g. VS Code)
- [The extension for VS Code ignores the modern telemetry flag](https://togithub.com/prisma/language-tools/issues/1463)
- [Prisma VS Code extension with mongodb provider crashes when a relation field/type is not defined ](https://togithub.com/prisma/language-tools/issues/1466)
- [Editing schema.prisma results in wasm panics](https://togithub.com/prisma/language-tools/issues/1473)
#### Credits
Huge thanks to [@skyzh](https://togithub.com/skyzh), [@alula](https://togithub.com/alula), [@michaelpoellath](https://togithub.com/michaelpoellath), [@RobertCraigie](https://togithub.com/RobertCraigie), [@Gerschtli](https://togithub.com/Gerschtli), [@andyjy](https://togithub.com/andyjy), [@mejiaej](https://togithub.com/mejiaej), [@iurylippo](https://togithub.com/iurylippo), [@mrazauskas](https://togithub.com/mrazauskas) for helping!
### [`v5.0.0`](https://togithub.com/prisma/prisma/releases/tag/5.0.0)
[Compare Source](https://togithub.com/prisma/prisma/compare/4.16.2...5.0.0)
We’re excited to share the `5.0.0` release today 🎉
Prisma `5.0.0` contains a lot of changes that improve Prisma’s performance, especially in serverless environments. If you want to learn more about the performance improvements, we wrote a blog post that sums up all the changes we made: [Prisma 5: Faster by Default](https://www.prisma.io/blog/prisma-5-f66prwkjx72s).
As this is a major release, it includes a few breaking changes that might affect a small group of our users. Before upgrading, we recommend that you check out our [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-5) to understand the impact on your application.
🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v5.0.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.0.0) about the release.** 🌟
### Highlights
Here’s a summary of the changes:
- Preview features moved to General Availability
- `jsonProtocol`: improves communication between Prisma Client and the query engine, makes Prisma faster by default.
- `fieldReference`: adds support for comparing columns of the same table.
- `extendedWhereUnique`: adds support for non-unique columns inside `where` clauses for queries that operate on unique records.
- General improvements and breaking changes
- Dependency version changes
- Minimum Node.js version change to 16.13.0
- Minimum TypeScript version change to 4.7
- Minimum PostgreSQL version change to 9.6
- Prisma Client embedded SQLite version upgrade to 3.41.2
- Main Changes
- Removal of `rejectOnNotFound` property
- Removal of some array shortcuts
- `cockroachdb` provider is now required when connecting to a CockroachDB database
- Removed `runtime/index.js` from the generated Prisma Client
- Other Changes
- Removal of deprecated flags in the Prisma CLI
- Removal of the `beforeExit` hook from the library engine
- Removal of deprecated `prisma2` executable
- Removal of deprecated `experimentalFeatures` generator property in the Prisma schema
- Renamed `migration-engine` to `schema-engine`
#### A JSON-based protocol that improves Prisma’s performance
We’re thrilled to announce that the `jsonProtocol` Preview feature is now Generally Available. You can now remove the Preview feature flag from your schema after upgrading. We made the JSON-based wire protocol the **default protocol** used for communication between Prisma Client and the query engine.
We introduced this feature in version [4.11.0](https://togithub.com/prisma/prisma/releases/tag/4.11.0) to improve Prisma’s performance. Previously, Prisma used a GraphQL-like protocol to communicate between Prisma Client and the query engine. Applications with larger schemas had higher CPU and memory consumption compared to smaller schemas which created a performance bottleneck.
The JSON-based wire protocol improves efficiency when Prisma Client is communicating with the query engine.
##### Removal of array shortcuts
We took the opportunity to remove some array shortcuts to make our typings more consistent and logical. These shortcuts were a way to add a single element as a value to an array-based operator instead of wrapping a single element in an array. We will now require array v
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
4.7.5
->4.9.1
3.370.0
->3.388.0
3.391.0
17.6.6
->17.7.1
17.6.6
->17.7.0
^17.4.4
->17.4.4
10.0.3
->10.0.5
4.16.2
->5.1.1
^13.2.0
->13.2.0
18.16.19
->18.17.5
6.1.0
->6.3.0
6.4.0
6.1.0
->6.3.0
6.4.0
0.33.0
->0.34.1
88522ab
c85c95e
bea5baf
2.87.0
->2.91.0
2.92.0
2.87.0
->2.91.0
2.92.0
2.87.0
->2.91.0
2.92.0
2.87.0
->2.91.0
2.92.0
0.18.14
->0.19.1
0.19.2
0.18.14
->0.19.1
0.19.2
8.45.0
->8.47.0
8.8.0
->9.0.0
1.10.8
->1.10.12
2.27.5
->2.28.0
3abd5ab
3.0.0
->3.0.1
3.0.2
4.17.0
->5.0.0
4.16.2
->5.1.1
195215d
7.1.0
->7.2.0
1.10.8
->1.10.12
0.3.9
->0.3.10
0.33.0
->0.34.1
Release Notes
apollographql/apollo-server (@apollo/server)
### [`v4.9.1`](https://togithub.com/apollographql/apollo-server/blob/HEAD/packages/server/CHANGELOG.md#491) [Compare Source](https://togithub.com/apollographql/apollo-server/compare/@apollo/server@4.9.0...@apollo/server@4.9.1) ##### Patch Changes - [#7672](https://togithub.com/apollographql/apollo-server/pull/7672) [`ebfde0007`](https://togithub.com/apollographql/apollo-server/commit/ebfde0007c647d9fb73e3aa24b968def3e307084) Thanks [@trevor-scheer](https://togithub.com/trevor-scheer)! - Add missing `nonce` on `script` tag for non-embedded landing page ### [`v4.9.0`](https://togithub.com/apollographql/apollo-server/blob/HEAD/packages/server/CHANGELOG.md#490) [Compare Source](https://togithub.com/apollographql/apollo-server/compare/@apollo/server@4.8.1...@apollo/server@4.9.0) ##### Minor Changes - [#7617](https://togithub.com/apollographql/apollo-server/pull/7617) [`4ff81ca50`](https://togithub.com/apollographql/apollo-server/commit/4ff81ca508d46eaafa4aa7c265cf2ba2c4421524) Thanks [@trevor-scheer](https://togithub.com/trevor-scheer)! - Introduce new `ApolloServerPluginSubscriptionCallback` plugin. This plugin implements the [subscription callback protocol](https://togithub.com/apollographql/router/blob/dev/dev-docs/callback_protocol.md) which is used by Apollo Router. This feature implements subscriptions over HTTP via a callback URL which Apollo Router registers with Apollo Server. This feature is currently in preview and is subject to change. You can enable callback subscriptions like so: ```ts import { ApolloServerPluginSubscriptionCallback } from '@apollo/server/plugin/subscriptionCallback'; import { ApolloServer } from '@apollo/server'; const server = new ApolloServer({ // ... plugins: [ApolloServerPluginSubscriptionCallback()], }); ``` Note that there is currently no tracing or metrics mechanism in place for callback subscriptions. Additionally, this plugin "intercepts" callback subscription requests and bypasses some of Apollo Server's internals. The result of this is that certain plugin hooks (notably `executionDidStart` and `willResolveField`) will not be called when handling callback subscription requests or when sending subscription events. For more information on the subscription callback protocol, visit the docs: https://www.apollographql.com/docs/router/executing-operations/subscription-callback-protocol/ ##### Patch Changes - [#7659](https://togithub.com/apollographql/apollo-server/pull/7659) [`4784f46fb`](https://togithub.com/apollographql/apollo-server/commit/4784f46fb580cdcd4359a86180def7d221856480) Thanks [@renovate](https://togithub.com/apps/renovate)! - Update graphql-http dependency ### [`v4.8.1`](https://togithub.com/apollographql/apollo-server/blob/HEAD/packages/server/CHANGELOG.md#481) [Compare Source](https://togithub.com/apollographql/apollo-server/compare/@apollo/server@4.8.0...@apollo/server@4.8.1) ##### Patch Changes - [#7636](https://togithub.com/apollographql/apollo-server/pull/7636) [`42fc65cb2`](https://togithub.com/apollographql/apollo-server/commit/42fc65cb282a8d5b8bf853775a8eedc421d33524) Thanks [@trevor-scheer](https://togithub.com/trevor-scheer)! - Update test suite for compatibility with Node v20 ### [`v4.8.0`](https://togithub.com/apollographql/apollo-server/blob/HEAD/packages/server/CHANGELOG.md#480) [Compare Source](https://togithub.com/apollographql/apollo-server/compare/@apollo/server@4.7.5...@apollo/server@4.8.0) ##### Minor Changes - [#7634](https://togithub.com/apollographql/apollo-server/pull/7634) [`f8a8ea08f`](https://togithub.com/apollographql/apollo-server/commit/f8a8ea08fed4090115b1a025e57bdb0f2deb82fc) Thanks [@dfperry5](https://togithub.com/dfperry5)! - Updating the ApolloServer constructor to take in a stringifyResult function that will allow a consumer to pass in a function that formats the result of an http query. Usage: ```ts const server = new ApolloServer({ typeDefs, resolvers, stringifyResult: (value: FormattedExecutionResult) => { return JSON.stringify(value, null, 2); }, }); ```aws/aws-sdk-js-v3 (@aws-sdk/client-lambda)
### [`v3.388.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33880-2023-08-09) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.387.0...v3.388.0) **Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda) ### [`v3.387.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33870-2023-08-08) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.386.0...v3.387.0) ##### Features - **clients:** allow client creation without configuration ([#5060](https://togithub.com/aws/aws-sdk-js-v3/issues/5060)) ([a9723dc](https://togithub.com/aws/aws-sdk-js-v3/commit/a9723dcbbf970402a3131a8ff79153a04b2cfb89)) ### [`v3.386.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33860-2023-08-07) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.385.0...v3.386.0) **Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda) ### [`v3.385.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33850-2023-08-04) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.382.0...v3.385.0) **Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda) ### [`v3.382.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33820-2023-08-01) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.379.1...v3.382.0) **Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda) #### [3.379.1](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.379.0...v3.379.1) (2023-07-28) **Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda) ### [`v3.379.1`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33791-2023-07-28) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.378.0...v3.379.1) **Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda) ### [`v3.378.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33780-2023-07-26) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.377.0...v3.378.0) **Note:** Version bump only for package [@aws-sdk/client-lambda](https://togithub.com/aws-sdk/client-lambda) ### [`v3.377.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-lambda/CHANGELOG.md#33770-2023-07-25) [Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.370.0...v3.377.0) ##### Features - **client-lambda:** Add Python 3.11 (python3.11) support to AWS Lambda ([08e0f30](https://togithub.com/aws/aws-sdk-js-v3/commit/08e0f308c3c2dbaa863d6d3ebb912db5fadd90ad))conventional-changelog/commitlint (@commitlint/cli)
### [`v17.7.1`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/cli/CHANGELOG.md#1771-2023-08-10) [Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.7.0...v17.7.1) **Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli) ### [`v17.7.0`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/cli/CHANGELOG.md#1770-2023-08-09) [Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) **Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli) #### [17.6.7](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli) #### [17.6.6](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.5...v17.6.6) (2023-06-24) **Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli) #### [17.6.5](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.4...v17.6.5) (2023-05-30) **Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli) #### [17.6.3](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.2...v17.6.3) (2023-05-04) **Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli) #### [17.6.1](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.0...v17.6.1) (2023-04-14) **Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli) ### [`v17.6.7`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/cli/CHANGELOG.md#1767-2023-07-19) [Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) **Note:** Version bump only for package [@commitlint/cli](https://togithub.com/commitlint/cli)conventional-changelog/commitlint (@commitlint/config-conventional)
### [`v17.7.0`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/config-conventional/CHANGELOG.md#1770-2023-08-09) [Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) **Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional) #### [17.6.7](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional) #### [17.6.6](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.5...v17.6.6) (2023-06-24) **Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional) #### [17.6.5](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.4...v17.6.5) (2023-05-30) **Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional) #### [17.6.3](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.2...v17.6.3) (2023-05-04) **Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional) #### [17.6.1](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.0...v17.6.1) (2023-04-14) **Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional) ### [`v17.6.7`](https://togithub.com/conventional-changelog/commitlint/blob/HEAD/@commitlint/config-conventional/CHANGELOG.md#1767-2023-07-19) [Compare Source](https://togithub.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) **Note:** Version bump only for package [@commitlint/config-conventional](https://togithub.com/commitlint/config-conventional)ardatan/graphql-tools (@graphql-tools/utils)
### [`v10.0.5`](https://togithub.com/ardatan/graphql-tools/blob/HEAD/packages/utils/CHANGELOG.md#1005) [Compare Source](https://togithub.com/ardatan/graphql-tools/compare/@graphql-tools/utils@10.0.4...@graphql-tools/utils@10.0.5) ##### Patch Changes - [`a59fb765`](https://togithub.com/ardatan/graphql-tools/commit/a59fb765a1256b914f1728283d793d61b66bdf89) Thanks [@ardatan](https://togithub.com/ardatan)! - Optimizations to get better performance in query planning ### [`v10.0.4`](https://togithub.com/ardatan/graphql-tools/blob/HEAD/packages/utils/CHANGELOG.md#1004) [Compare Source](https://togithub.com/ardatan/graphql-tools/compare/@graphql-tools/utils@10.0.3...@graphql-tools/utils@10.0.4) ##### Patch Changes - [#5444](https://togithub.com/ardatan/graphql-tools/pull/5444) [`c1afb545`](https://togithub.com/ardatan/graphql-tools/commit/c1afb5452d2df1e9fa5553ba024d77a00e0d9398) Thanks [@kennyjwilli](https://togithub.com/kennyjwilli)! - Exports the `DirectableGraphQLObject` type.prisma/prisma (@prisma/client)
### [`v5.1.1`](https://togithub.com/prisma/prisma/releases/tag/5.1.1) [Compare Source](https://togithub.com/prisma/prisma/compare/5.1.0...5.1.1) Today, we are issuing the `5.1.1` patch release. ##### Fixes in Prisma Client - [Browser bundle: Unhandled Runtime Error when upgrading to 5.1.0 from 5.0.0 ](https://togithub.com/prisma/prisma/issues/20480) - [Prisma Client: `disconnect: true` does not appear to delete the foreign key in the returned data](https://togithub.com/prisma/prisma/issues/20491) - [Prisma Client errors with "TypeError: Cannot create proxy with a non-object as target or handler" when using result client extension with no `needs` and `count` method](https://togithub.com/prisma/prisma/issues/20499) ### [`v5.1.0`](https://togithub.com/prisma/prisma/releases/tag/5.1.0) [Compare Source](https://togithub.com/prisma/prisma/compare/5.0.0...5.1.0) Today, we are excited to share the `5.1.0` stable release 🎉 🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v5.1.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.1.0) about the release.** ### Highlights After two big releases where we released Client extensions for production usage ([`4.16.0`](https://togithub.com/prisma/prisma/releases/tag/4.16.0)) and made Prisma faster by default ([`5.0.0`](https://togithub.com/prisma/prisma/releases/tag/5.0.0)), we have focused on some smaller issues to make the experience with these new features even better. #### Community contributions Our community has been on the roll! We appreciate everyone who helps us by opening a GitHub issue or proposing a fix via Pull Requests. In this release, we're excited to highlight multiple community contributions: - Fix IPv6 not working for relational databases: [https://github.com/prisma/prisma-engines/pull/4051](https://togithub.com/prisma/prisma-engines/pull/4051) by [@alula](https://togithub.com/alula) - Middlewares: Add to `PrismaAction` type, missing `findUniqueOrThrow` and `findFirstOrThrow` [https://github.com/prisma/prisma/pull/17471](https://togithub.com/prisma/prisma/pull/17471) by [@mejiaej](https://togithub.com/mejiaej) and missing `groupBy` [https://github.com/prisma/prisma/pull/19985](https://togithub.com/prisma/prisma/pull/19985) by [@iurylippo](https://togithub.com/iurylippo) - Better error message in currently non-supported runtimes like Browser or Vercel Edge Runtime [https://github.com/prisma/prisma/pull/20163](https://togithub.com/prisma/prisma/pull/20163) by [@andyjy](https://togithub.com/andyjy) - Remove error messages for valid NixOS setups [https://github.com/prisma/prisma/pull/20138](https://togithub.com/prisma/prisma/pull/20138) by [@Gerschtli](https://togithub.com/Gerschtli) #### Better performance: Fewer SQL queries on PostgreSQL & CockroachDB In our continued and ongoing work to make Prisma faster, we identified some Prisma Client queries that led to multiple SQL statements being executed — although in specific databases, that was not necessary. Hence we optimized our internal SQL generation for PostgreSQL and CockroachDB to generate more efficient SQL queries: ##### Simple `create` query In a simple `create` query, `RETURNING` makes the second query and the transaction statements obsolete: ##### Prisma Client query ```ts prisma.user.create({ data: { name: "Original name" } }) ``` ##### Before v5.1.0 ```sql BEGIN INSERT INTO "User" ("name") VALUES ($1) RETURNING "User"."id" SELECT "User"."id", "User"."name" FROM "User" WHERE "User"."id" = $1; COMMIT ``` ##### 5.1.0 and later ```sql -- Sends 1 statement (instead of 2) and omits the transaction INSERT INTO "User" ("name") VALUES ($1) RETURNING "User"."id", "User"."name" ``` ##### Simple `update` query For a simple `update` query, `RETURNING` makes both additional queries and the transaction statements obsolete: ##### Prisma Client query ```ts prisma.user.update({ where: { id: 1 }, data: { name: "updated" } }) ``` ##### Before v5.1.0 ```sql BEGIN SELECT id FROM "User" WHERE "User".id = 1; UPDATE "User" SET name = 'updated' WHERE "User".id = 1; SELECT id, name FROM "User" WHERE "User".id = 1; COMMIT ``` ##### 5.1.0 and later ```sql -- Sends 1 statement (instead of 3) and omits the transaction UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id, "User".name; ``` ##### Simple `update` query, return with relation value One `SELECT` query could easily be dropped in a simple `update` query that should return a relation value as well: ##### Prisma Client query ```ts prisma.user.update({ where: { id: 1 }, data: { name: "updated" }, includes: { posts: true } }) ``` ##### Before v5.1.0 ```sql BEGIN SELECT id FROM "User" WHERE "User".id = 1; UPDATE "User" SET name = 'updated' WHERE "User".id = 1; SELECT id, name FROM "User" WHERE "User".id = 1; SELECT id, title FROM "Post" WHERE "Post"."userId" = 1; COMMIT ``` ##### 5.1.0 and later ```sql -- Sends 3 statements (instead of 4) BEGIN UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id; SELECT id, name FROM "User" WHERE "User".id = 1; SELECT id, title FROM "Post" WHERE "Post"."userId" = 1; COMMIT ``` ##### Empty `update` query An empty `update` query can be optimized to skip the transaction and the second identical query by creating specific handling for this edge case in our code: ##### Prisma Client query ```ts prisma.user.update({ where: { id: 1 }, data: {}, }) ``` ##### Before v5.1.0 ```sql BEGIN SELECT id, name FROM "User" WHERE "User".id = 1; SELECT id, name FROM "User" WHERE "User".id = 1; COMMIT ``` ##### 5.1.0 and later ```sql -- Sends 1 statement (instead of 2) and omits the transaction SELECT id, name FROM "User" WHERE "User".id = 1; ``` ##### Simple + relation `update` query (but do not return relation value) An update of both the model and its relation, we could drop 2 `SELECT` queries that we did before without ever using their return values: ##### Prisma Client query ```ts prisma.user.update({ where: { id: 1 }, data: { name: "updated", posts: { update: { where: { id: 1 }, data: { title: "updated" } } } } }) ``` ##### Before v5.1.0 ```sql BEGIN SELECT id, name FROM "User" WHERE "User".id = 1; UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id; SELECT "id", "postId" FROM "Post" WHERE "Post".id = 1; UPDATE "Post" SET title = 'updated' WHERE "Post"."userId" = 1 AND "Post".id = 1; SELECT id, name FROM "User" WHERE "User".id = 1; COMMIT ``` ##### 5.1.0 and later ```sql -- Sends 3 statements (instead of 5) BEGIN UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id, "User".name; SELECT "id", "postId" FROM "Post" WHERE "Post".id = 1; UPDATE "Post" SET title = 'updated' WHERE "Post"."userId" = 1 AND "Post".id = 1; COMMIT ``` In the next releases, we will continue optimizing Prisma Client queries to only run the minimal amount of SQL queries necessary. If you notice any Prisma Client queries that are affected right now, please check the issues under [our `performance/queries` label](https://togithub.com/prisma/prisma/labels/topic%3A%20performance%2Fqueries). If you didn’t find one for what you’re seeing, please [create a new issue](https://togithub.com/prisma/prisma/issues). This will be super useful for us to understand all (edge) cases. Thank you! #### Prisma Studio now supports `directUrl` Our CLI command `prisma studio` that opens Prisma Studio now also can use the [`directUrl`](https://www.prisma.io/docs/guides/performance-and-optimization/connection-management#external-connection-poolers) property of the `datasource` block so you can make it talk to a different database than defined in `url`. This makes it easier to use Studio alongside the Prisma Data Proxy and [Accelerate](https://www.prisma.io/accelerate). #### Prisma Client: No more type clashes We fixed (almost) all cases where using a specific term as a model name in your Prisma Schema would lead to a *type clash* due to Prisma’s generated typings. As a result of a type clash, it was not possible to use that model in your code (this was e.g. the case if you named a model `Model` or `ModelUpdate`). We also deprecated the `Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.