Skip to content

Commit

Permalink
Port #6763 from AS3
Browse files Browse the repository at this point in the history
Usage reporting: fix TS declaration of fieldLevelInstrumentation

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 4, 2022
1 parent 1f5591b commit 0154084
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spicy-lions-deliver.md
@@ -0,0 +1,5 @@
---
"@apollo/server": patch
---

Port #6763 from AS3 (fix fieldLevelInstrumentation type declaration)
2 changes: 1 addition & 1 deletion packages/server/src/plugin/usageReporting/options.ts
Expand Up @@ -123,7 +123,7 @@ export interface ApolloServerPluginUsageReportingOptions<
| 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 0154084

Please sign in to comment.