Skip to content

Commit

Permalink
[apollo-server-plugin-base] fix GraphQLRequestListener type def… (#2368)
Browse files Browse the repository at this point in the history
* fix GraphQLRequestListener type definitions

* update changelog

* Adjust CHANGELOG.md for #2368.
  • Loading branch information
doomsower authored and abernix committed Jun 30, 2019
1 parent 587be9d commit bf0cd6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ 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 to allow `return void`. [PR #2368](https://github.com/apollographql/apollo-server/pull/2368)

### v2.6.7

> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/183de5f112324def375a45c239955e1bf1608fae)
Expand Down
6 changes: 3 additions & 3 deletions packages/apollo-server-plugin-base/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export interface GraphQLRequestListener<TContext = Record<string, any>> {
GraphQLRequestContext<TContext>,
'metrics' | 'source'
>,
): (err?: Error) => void | void;
): ((err?: Error) => void) | void;
validationDidStart?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'metrics' | 'source' | 'document'
>,
): (err?: ReadonlyArray<Error>) => void | void;
): ((err?: ReadonlyArray<Error>) => void) | void;
didResolveOperation?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
Expand Down Expand Up @@ -64,7 +64,7 @@ export interface GraphQLRequestListener<TContext = Record<string, any>> {
GraphQLRequestContext<TContext>,
'metrics' | 'source' | 'document' | 'operationName' | 'operation'
>,
): (err?: Error) => void | void;
): ((err?: Error) => void) | void;
willSendResponse?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
Expand Down

0 comments on commit bf0cd6b

Please sign in to comment.