From ef44e9332726c2268c77373dd6b9e4523b657f7f Mon Sep 17 00:00:00 2001 From: doomsower Date: Sun, 24 Feb 2019 12:27:00 +0300 Subject: [PATCH 1/3] fix GraphQLRequestListener type definitions --- packages/apollo-server-plugin-base/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/apollo-server-plugin-base/src/index.ts b/packages/apollo-server-plugin-base/src/index.ts index e09d4efc971..1908388739f 100644 --- a/packages/apollo-server-plugin-base/src/index.ts +++ b/packages/apollo-server-plugin-base/src/index.ts @@ -25,10 +25,10 @@ export type WithRequired = T & Required>; export interface GraphQLRequestListener> { parsingDidStart?( requestContext: GraphQLRequestContext, - ): (err?: Error) => void | void; + ): ((err?: Error) => void) | void; validationDidStart?( requestContext: WithRequired, 'document'>, - ): (err?: ReadonlyArray) => void | void; + ): ((err?: ReadonlyArray) => void) | void; didResolveOperation?( requestContext: WithRequired< GraphQLRequestContext, @@ -40,7 +40,7 @@ export interface GraphQLRequestListener> { GraphQLRequestContext, 'document' | 'operationName' | 'operation' >, - ): (err?: Error) => void | void; + ): ((err?: Error) => void) | void; willSendResponse?( requestContext: WithRequired, 'response'>, ): ValueOrPromise; From ae7744f6f3751f8cbd7106a752710c09f64ced54 Mon Sep 17 00:00:00 2001 From: doomsower Date: Sun, 24 Feb 2019 12:35:48 +0300 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e63a75b9fe2..08e4a7bfea0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### vNEXT +- `apollo-server-plugin-base` fix GraphQLRequestListener type definitions [PR #2368](https://github.com/apollographql/apollo-server/pull/2368) + ### v2.4.6 - Allow Node.js-like runtimes to identify as Node.js as well. [PR #2357](https://github.com/apollographql/apollo-server/pull/2357) [Issue #2356](https://github.com/apollographql/apollo-server/issue/2356) From f5c2f0566bf0717db6dc5c032a946e58703a6611 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Mon, 1 Jul 2019 02:28:38 +0300 Subject: [PATCH 3/3] Adjust CHANGELOG.md for #2368. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c83ead0266..11bfbf6fb41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The version headers in this history reflect the versions of Apollo Server itself > The changes noted within this `vNEXT` section have not been released yet. New PRs and commits which introduce changes should include an entry in this `vNEXT` section as part of their development. When a release is being prepared, a new header will be (manually) created below and the the appropriate changes within that release will be moved into the new section. -- `apollo-server-plugin-base` fix GraphQLRequestListener type definitions [PR #2368](https://github.com/apollographql/apollo-server/pull/2368) +- `apollo-server-plugin-base`: Fix `GraphQLRequestListener` type definitions to allow `return void`. [PR #2368](https://github.com/apollographql/apollo-server/pull/2368) ### v2.6.7