Skip to content

Commit

Permalink
Usage reporting: fix TS declaration of fieldLevelInstrumentation (#6763)
Browse files Browse the repository at this point in the history
Note that the `const fieldLevelInstrumentation` which this got assigned
to actually already inferred (roughly) the correct type because the type
got merged with a number-returning function from another case.
  • Loading branch information
glasser authored Aug 4, 2022
1 parent bd49975 commit 6140880
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The version headers in this history reflect the versions of Apollo Server itself

## vNEXT

- _Nothing yet! Stay tuned._
- Fix the TypeScript declaration of the `fieldLevelInstrumentation` option to `ApolloServerPluginUsageReporting` to show that the function may return a number in addition to a boolean. This now matches the implementation and docs. [PR #6763](https://github.com/apollographql/apollo-server/pull/6763)

## v3.10.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export interface ApolloServerPluginUsageReportingOptions<TContext> {
| number
| ((
request: GraphQLRequestContextDidResolveOperation<TContext>,
) => Promise<boolean>);
) => Promise<number | boolean>);

/**
* This option allows you to choose if a particular request should be
Expand Down

0 comments on commit 6140880

Please sign in to comment.