Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[apollo-server-plugin-base] fix GraphQLRequestListener type definitions #2368

Merged
merged 4 commits into from
Jun 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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