Skip to content

Commit 05b2da4

Browse files
Version Packages (#7473)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @apollo/[email protected] ### Minor Changes - [#7465](#7465) [`1e808146a`](1e80814) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Introduce new opt-in configuration option to mitigate v4 status code regression Apollo Server v4 accidentally started responding to requests with an invalid `variables` object with a 200 status code, where v3 previously responded with a 400. In order to not break current behavior (potentially breaking users who have creatively worked around this issue) and offer a mitigation, we've added the following configuration option which we recommend for all users. ```ts new ApolloServer({ // ... status400ForVariableCoercionErrors: true, }); ``` Specifically, this regression affects cases where _input variable coercion_ fails. Variables of an incorrect type (i.e. `String` instead of `Int`) or unexpectedly `null` are examples that fail variable coercion. Additionally, missing or incorrect fields on input objects as well as custom scalars that throw during validation will also fail variable coercion. For more specifics on variable coercion, see the "Input Coercion" sections in the [GraphQL spec](https://spec.graphql.org/June2018/#sec-Scalars). This will become the default behavior in Apollo Server v5 and the configuration option will be ignored / no longer needed. ### Patch Changes - [#7454](#7454) [`f6e3ae021`](f6e3ae0) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Start building packages with TS 5.x, which should have no effect for users - [#7433](#7433) [`e0db95b96`](e0db95b) Thanks [@KGAdamCook](https://github.com/KGAdamCook)! - Previously, when users provided their own `documentStore`, Apollo Server used a random prefix per schema in order to guarantee there was no shared state from one schema to the next. Now Apollo Server uses a hash of the schema, which enables the provided document store to be shared if you choose to do so. ## @apollo/[email protected] ### Patch Changes - [#7454](#7454) [`f6e3ae021`](f6e3ae0) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Start building packages with TS 5.x, which should have no effect for users - Updated dependencies \[[`1e808146a`](1e80814), [`f6e3ae021`](f6e3ae0), [`e0db95b96`](e0db95b)]: - @apollo/[email protected] ## @apollo/[email protected] ### Patch Changes - [#7454](#7454) [`f6e3ae021`](f6e3ae0) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Start building packages with TS 5.x, which should have no effect for users Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent e0db95b commit 05b2da4

File tree

10 files changed

+49
-39
lines changed

10 files changed

+49
-39
lines changed

.changeset/purple-paws-yell.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

.changeset/shaggy-donkeys-joke.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/wet-berries-report.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/integration-testsuite/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @apollo/server-integration-testsuite
22

3+
## 4.6.0
4+
5+
### Patch Changes
6+
7+
- [#7454](https://github.com/apollographql/apollo-server/pull/7454) [`f6e3ae021`](https://github.com/apollographql/apollo-server/commit/f6e3ae021417c3b54200f8d3fcf4366dc3518998) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Start building packages with TS 5.x, which should have no effect for users
8+
9+
- Updated dependencies [[`1e808146a`](https://github.com/apollographql/apollo-server/commit/1e808146a8043245d9c68969fa73e085d5b1ccbd), [`f6e3ae021`](https://github.com/apollographql/apollo-server/commit/f6e3ae021417c3b54200f8d3fcf4366dc3518998), [`e0db95b96`](https://github.com/apollographql/apollo-server/commit/e0db95b960eb975ebd11f90ead21a589bd3972c8)]:
10+
- @apollo/server@4.6.0
11+
312
## 4.5.0
413

514
### Patch Changes

packages/integration-testsuite/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apollo/server-integration-testsuite",
3-
"version": "4.5.0",
3+
"version": "4.6.0",
44
"description": "Test suite for Apollo Server integrations",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
2828
"dependencies": {
2929
"@apollo/cache-control-types": "^1.0.2",
3030
"@apollo/client": "^3.6.9",
31-
"@apollo/server": "4.5.0",
31+
"@apollo/server": "4.6.0",
3232
"@apollo/server-plugin-landing-page-graphql-playground": "^4.0.0",
3333
"@apollo/utils.keyvaluecache": "^2.1.0",
3434
"@apollo/utils.createhash": "^2.0.0",

packages/plugin-response-cache/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @apollo/server-plugin-response-cache
22

3+
## 4.1.2
4+
5+
### Patch Changes
6+
7+
- [#7454](https://github.com/apollographql/apollo-server/pull/7454) [`f6e3ae021`](https://github.com/apollographql/apollo-server/commit/f6e3ae021417c3b54200f8d3fcf4366dc3518998) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Start building packages with TS 5.x, which should have no effect for users
8+
39
## 4.1.1
410

511
### Patch Changes

packages/plugin-response-cache/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apollo/server-plugin-response-cache",
3-
"version": "4.1.1",
3+
"version": "4.1.2",
44
"description": "Apollo Server full query response cache",
55
"type": "module",
66
"main": "dist/cjs/index.js",

packages/server/CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# @apollo/server
22

3+
## 4.6.0
4+
5+
### Minor Changes
6+
7+
- [#7465](https://github.com/apollographql/apollo-server/pull/7465) [`1e808146a`](https://github.com/apollographql/apollo-server/commit/1e808146a8043245d9c68969fa73e085d5b1ccbd) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Introduce new opt-in configuration option to mitigate v4 status code regression
8+
9+
Apollo Server v4 accidentally started responding to requests with an invalid `variables` object with a 200 status code, where v3 previously responded with a 400. In order to not break current behavior (potentially breaking users who have creatively worked around this issue) and offer a mitigation, we've added the following configuration option which we recommend for all users.
10+
11+
```ts
12+
new ApolloServer({
13+
// ...
14+
status400ForVariableCoercionErrors: true,
15+
});
16+
```
17+
18+
Specifically, this regression affects cases where _input variable coercion_ fails. Variables of an incorrect type (i.e. `String` instead of `Int`) or unexpectedly `null` are examples that fail variable coercion. Additionally, missing or incorrect fields on input objects as well as custom scalars that throw during validation will also fail variable coercion. For more specifics on variable coercion, see the "Input Coercion" sections in the [GraphQL spec](https://spec.graphql.org/June2018/#sec-Scalars).
19+
20+
This will become the default behavior in Apollo Server v5 and the configuration option will be ignored / no longer needed.
21+
22+
### Patch Changes
23+
24+
- [#7454](https://github.com/apollographql/apollo-server/pull/7454) [`f6e3ae021`](https://github.com/apollographql/apollo-server/commit/f6e3ae021417c3b54200f8d3fcf4366dc3518998) Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Start building packages with TS 5.x, which should have no effect for users
25+
26+
- [#7433](https://github.com/apollographql/apollo-server/pull/7433) [`e0db95b96`](https://github.com/apollographql/apollo-server/commit/e0db95b960eb975ebd11f90ead21a589bd3972c8) Thanks [@KGAdamCook](https://github.com/KGAdamCook)! - Previously, when users provided their own `documentStore`, Apollo Server used a random prefix per schema in order to guarantee there was no shared state from one schema to the next. Now Apollo Server uses a hash of the schema, which enables the provided document store to be shared if you choose to do so.
27+
328
## 4.5.0
429

530
### Minor Changes

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apollo/server",
3-
"version": "4.5.0",
3+
"version": "4.6.0",
44
"description": "Core engine for Apollo GraphQL server",
55
"type": "module",
66
"main": "dist/cjs/index.js",

0 commit comments

Comments
 (0)