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

fix: report APQ hit/registration when sendHeaders is disabled. #3986

Merged
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: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The version headers in this history reflect the versions of Apollo Server itself
### vNEXT

> 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-engine-reporting`: Fix inadvertant conditional formatting which prevented automated persisted query (APQ) hits and misses from being reported to Apollo Graph Manager. [PR #3986](https://github.com/apollographql/apollo-server/pull/3986)
- `apollo-server-lambda`: Support file uploads on AWS Lambda [Issue #1419](https://github.com/apollographql/apollo-server/issues/1419) [Issue #1703](https://github.com/apollographql/apollo-server/issues/1703) [PR #3926](https://github.com/apollographql/apollo-server/pull/3926)
- **breaking** `apollo-engine-reporting-protobuf`: Drop legacy fields that were never used by `apollo-engine-reporting`. Added new fields `StatsContext` to allow `apollo-server` to send summary stats instead of full traces, and renamed `FullTracesReport` to `Report` and `Traces` to `TracesAndStats` since reports now can include stats as well as traces.

Expand Down
12 changes: 6 additions & 6 deletions packages/apollo-engine-reporting/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ export class EngineReportingExtension<TContext = any>
o.request.headers,
this.options.sendHeaders,
);
}

if (o.requestContext.metrics.persistedQueryHit) {
this.treeBuilder.trace.persistedQueryHit = true;
}
if (o.requestContext.metrics.persistedQueryRegister) {
this.treeBuilder.trace.persistedQueryRegister = true;
}
if (o.requestContext.metrics.persistedQueryHit) {
this.treeBuilder.trace.persistedQueryHit = true;
}
if (o.requestContext.metrics.persistedQueryRegister) {
this.treeBuilder.trace.persistedQueryRegister = true;
}

if (o.variables) {
Expand Down