diff --git a/.changeset/pre.json b/.changeset/pre.json index 9c0bba5aa53..ec9c360f1a3 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -22,6 +22,7 @@ "spicy-pugs-deliver", "stale-sheep-search", "twenty-cooks-repair", - "violet-mayflies-help" + "violet-mayflies-help", + "wet-kiwis-play" ] } diff --git a/package-lock.json b/package-lock.json index 8715c2de467..42a5ce1448f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15045,7 +15045,7 @@ }, "packages/integration-testsuite": { "name": "@apollo/server-integration-testsuite", - "version": "4.0.0-alpha.5", + "version": "4.0.0-alpha.6", "license": "MIT", "dependencies": { "@apollo/cache-control-types": "^1.0.2", @@ -15065,7 +15065,7 @@ "node": ">=14.0" }, "peerDependencies": { - "@apollo/server": "^4.0.0-alpha.5", + "@apollo/server": "^4.0.0-alpha.6", "@jest/globals": "28.x", "graphql": "^16.5.0", "jest": "28.x" @@ -15073,7 +15073,7 @@ }, "packages/plugin-response-cache": { "name": "@apollo/server-plugin-response-cache", - "version": "4.0.0-alpha.3", + "version": "4.0.0-alpha.4", "license": "MIT", "dependencies": { "@apollo/utils.createhash": "^1.1.0", @@ -15083,13 +15083,13 @@ "node": ">=14.0" }, "peerDependencies": { - "@apollo/server": "^4.0.0-alpha.5", + "@apollo/server": "^4.0.0-alpha.6", "graphql": "^16.5.0" } }, "packages/server": { "name": "@apollo/server", - "version": "4.0.0-alpha.5", + "version": "4.0.0-alpha.6", "license": "MIT", "dependencies": { "@apollo/cache-control-types": "^1.0.2", diff --git a/packages/integration-testsuite/CHANGELOG.md b/packages/integration-testsuite/CHANGELOG.md index 481af688c59..dcd2bc7938c 100644 --- a/packages/integration-testsuite/CHANGELOG.md +++ b/packages/integration-testsuite/CHANGELOG.md @@ -1,5 +1,22 @@ # @apollo/server-integration-testsuite +## 4.0.0-alpha.6 + +### Patch Changes + +- [#6814](https://github.com/apollographql/apollo-server/pull/6814) [`cf0fcf49a`](https://github.com/apollographql/apollo-server/commit/cf0fcf49afa9b8ee12840f5ac4bf1be6320cb7e1) Thanks [@glasser](https://github.com/glasser)! - Several changes relating to plugins: + + - Remove the `server` field on `GraphQLRequestContext` and `GraphQLServerContext` (ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3. + + - Add `logger` and `cache` fields to `GraphQLRequestContext` and `GraphQLServerContext`. The `logger` fields and `GraphQLRequestContext.cache` existed in AS3 and had been previously removed for redundancy with the `server` field. (Unlike in AS3, `logger` is readonly.) + + - `ApolloServerPlugin` is now declared as `` rather than ``. This means that you can declare a plugin that doesn't care about `contextValue` to simply implement `ApolloServerPlugin` and it will work with any `ApolloServer`. This should make it easy to write plugins that don't care about context. + + - Remove the ability to specify a factory function as an element of the `plugins` list in the `ApolloServer` constructor. (Reducing the number of ways to specify constructor options helps keep type errors simpler.) As far as we know the main use case for this (referring to the `ApolloServer` itself when creating the plugin) can be handled with the new-in-AS4 `ApolloServer.addPlugin` method. + +- Updated dependencies [[`cf0fcf49a`](https://github.com/apollographql/apollo-server/commit/cf0fcf49afa9b8ee12840f5ac4bf1be6320cb7e1)]: + - @apollo/server@4.0.0-alpha.6 + ## 4.0.0-alpha.5 ### Patch Changes diff --git a/packages/integration-testsuite/package.json b/packages/integration-testsuite/package.json index 49838d98432..36bcd12cb34 100644 --- a/packages/integration-testsuite/package.json +++ b/packages/integration-testsuite/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/server-integration-testsuite", - "version": "4.0.0-alpha.5", + "version": "4.0.0-alpha.6", "description": "Test suite for Apollo Server integrations", "type": "module", "main": "dist/index.js", @@ -41,7 +41,7 @@ "supertest": "^6.2.3" }, "peerDependencies": { - "@apollo/server": "^4.0.0-alpha.5", + "@apollo/server": "^4.0.0-alpha.6", "@jest/globals": "28.x", "graphql": "^16.5.0", "jest": "28.x" diff --git a/packages/plugin-response-cache/CHANGELOG.md b/packages/plugin-response-cache/CHANGELOG.md index 975147ba2e8..dbc50ca4050 100644 --- a/packages/plugin-response-cache/CHANGELOG.md +++ b/packages/plugin-response-cache/CHANGELOG.md @@ -1,5 +1,22 @@ # @apollo/server-plugin-response-cache +## 4.0.0-alpha.4 + +### Patch Changes + +- [#6814](https://github.com/apollographql/apollo-server/pull/6814) [`cf0fcf49a`](https://github.com/apollographql/apollo-server/commit/cf0fcf49afa9b8ee12840f5ac4bf1be6320cb7e1) Thanks [@glasser](https://github.com/glasser)! - Several changes relating to plugins: + + - Remove the `server` field on `GraphQLRequestContext` and `GraphQLServerContext` (ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3. + + - Add `logger` and `cache` fields to `GraphQLRequestContext` and `GraphQLServerContext`. The `logger` fields and `GraphQLRequestContext.cache` existed in AS3 and had been previously removed for redundancy with the `server` field. (Unlike in AS3, `logger` is readonly.) + + - `ApolloServerPlugin` is now declared as `` rather than ``. This means that you can declare a plugin that doesn't care about `contextValue` to simply implement `ApolloServerPlugin` and it will work with any `ApolloServer`. This should make it easy to write plugins that don't care about context. + + - Remove the ability to specify a factory function as an element of the `plugins` list in the `ApolloServer` constructor. (Reducing the number of ways to specify constructor options helps keep type errors simpler.) As far as we know the main use case for this (referring to the `ApolloServer` itself when creating the plugin) can be handled with the new-in-AS4 `ApolloServer.addPlugin` method. + +- Updated dependencies [[`cf0fcf49a`](https://github.com/apollographql/apollo-server/commit/cf0fcf49afa9b8ee12840f5ac4bf1be6320cb7e1)]: + - @apollo/server@4.0.0-alpha.6 + ## 4.0.0-alpha.3 ### Patch Changes diff --git a/packages/plugin-response-cache/package.json b/packages/plugin-response-cache/package.json index 45c8acecfbd..a26583beca4 100644 --- a/packages/plugin-response-cache/package.json +++ b/packages/plugin-response-cache/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/server-plugin-response-cache", - "version": "4.0.0-alpha.3", + "version": "4.0.0-alpha.4", "description": "Apollo Server full query response cache", "type": "module", "main": "dist/cjs/index.js", @@ -33,7 +33,7 @@ "@apollo/utils.keyvaluecache": "^1.0.1" }, "peerDependencies": { - "@apollo/server": "^4.0.0-alpha.5", + "@apollo/server": "^4.0.0-alpha.6", "graphql": "^16.5.0" } } diff --git a/packages/server/CHANGELOG.md b/packages/server/CHANGELOG.md index 4934cff787e..caf84dc7948 100644 --- a/packages/server/CHANGELOG.md +++ b/packages/server/CHANGELOG.md @@ -1,5 +1,19 @@ # @apollo/server +## 4.0.0-alpha.6 + +### Patch Changes + +- [#6814](https://github.com/apollographql/apollo-server/pull/6814) [`cf0fcf49a`](https://github.com/apollographql/apollo-server/commit/cf0fcf49afa9b8ee12840f5ac4bf1be6320cb7e1) Thanks [@glasser](https://github.com/glasser)! - Several changes relating to plugins: + + - Remove the `server` field on `GraphQLRequestContext` and `GraphQLServerContext` (ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3. + + - Add `logger` and `cache` fields to `GraphQLRequestContext` and `GraphQLServerContext`. The `logger` fields and `GraphQLRequestContext.cache` existed in AS3 and had been previously removed for redundancy with the `server` field. (Unlike in AS3, `logger` is readonly.) + + - `ApolloServerPlugin` is now declared as `` rather than ``. This means that you can declare a plugin that doesn't care about `contextValue` to simply implement `ApolloServerPlugin` and it will work with any `ApolloServer`. This should make it easy to write plugins that don't care about context. + + - Remove the ability to specify a factory function as an element of the `plugins` list in the `ApolloServer` constructor. (Reducing the number of ways to specify constructor options helps keep type errors simpler.) As far as we know the main use case for this (referring to the `ApolloServer` itself when creating the plugin) can be handled with the new-in-AS4 `ApolloServer.addPlugin` method. + ## 4.0.0-alpha.5 ### Patch Changes diff --git a/packages/server/package.json b/packages/server/package.json index b6fefddb1af..654c109cca5 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/server", - "version": "4.0.0-alpha.5", + "version": "4.0.0-alpha.6", "description": "Core engine for Apollo GraphQL server", "type": "module", "main": "dist/cjs/index.js",