Repository navigation
fix(api): Add deprecated 'report' field to Comparison GraphQL type - #2459
sentry[bot] wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
|
The Sentry GitHub App installation for this repository is missing permissions it needs to keep iterating on this pull request to get CI passing. Review and accept the updated permissions to let Seer continue: https://github.com/organizations/codecov/settings/installations/86101127/permissions/update |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (66.66%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2459 +/- ##
==========================================
- Coverage 91.65% 91.64% -0.01%
==========================================
Files 1341 1341
Lines 53342 53345 +3
Branches 1649 1649
==========================================
+ Hits 48888 48890 +2
- Misses 4133 4134 +1
Partials 321 321
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
This PR addresses an issue where an external API client was querying a non-existent
reportfield on the GraphQLComparisontype, leading to aGraphQLError: Cannot query field 'report' on type 'Comparison'.To resolve this validation error for the external client, a
reportfield has been added to theComparisontype in the GraphQL schema. This new field is marked as@deprecatedand returns the sameCoverageTotalsdata as the existingheadTotalsfield. This provides backward compatibility for the client's query while encouraging migration to the more explicitheadTotalsfield.Changes:
report: CoverageTotals @deprecated(reason: "Use headTotals instead")toapps/codecov-api/graphql_api/types/comparison/comparison.graphql.resolve_reportresolver inapps/codecov-api/graphql_api/types/comparison/comparison.pythat delegates toresolve_head_totals.Legal Boilerplate
Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.
Fixes API-F73
@sentry <feedback>: Autofix iterates on these changes@sentry stop iterating: Autofix stops iterating on this runThis PR was automatically generated by Sentry. You can adjust this setting at any time.
Note
Low Risk
Schema-only compatibility shim with no new business logic; deprecated field mirrors existing headTotals resolution.
Overview
Restores backward compatibility for GraphQL clients that still query
Comparison.report, which was removed from the schema and caused validation errors (Cannot query field 'report' on type 'Comparison').The PR reintroduces
reporton theComparisontype as a deprecated alias: it returns the sameCoverageTotalsasheadTotals, with@deprecated(reason: "Use headTotals instead")in the schema. The newresolve_reportresolver simply delegates toresolve_head_totals, so behavior matches the canonical field with no separate data path.Reviewed by Cursor Bugbot for commit 2b9e02b. Bugbot is set up for automated code reviews on this repo. Configure here.