Skip to content

Commit

Permalink
Usage reporting: fix TS declaration of fieldLevelInstrumentation
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 committed Aug 3, 2022
1 parent bd49975 commit 8642ad0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
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 #FIXME](https://github.com/apollographql/apollo-server/pull/FIXME)

## v3.10.0

Expand Down
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 8642ad0

Please sign in to comment.