Skip to content

fix(graphql): Add deprecated pullBase field to Pull type - #2458

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/graphql-pullbase-deprecated
Open

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/graphql-pullbase-deprecated

Conversation

@sentry

@sentry sentry Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

This PR addresses an unhandled GraphQLError occurring when external clients query the non-existent pullBase field on the Pull GraphQL type.

The pullBase field has never existed in our schema; the closest historical field was base, which was renamed to comparedTo in October 2021. To prevent these errors and provide backward compatibility for external consumers, this change introduces pullBase as a deprecated field that aliases to comparedTo.

Changes:

  • Added pullBase: Commit @deprecated(reason: "Use comparedTo") to apps/codecov-api/graphql_api/types/pull/pull.graphql.
  • Modified apps/codecov-api/graphql_api/types/pull/pull.py to use the existing resolve_base resolver for both comparedTo and the new pullBase field.

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-F7D

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.


Note

Low Risk
Read-only GraphQL compatibility shim with no changes to auth, persistence, or comparison behavior beyond exposing an alias field.

Overview
Adds a deprecated pullBase field on the GraphQL Pull type so clients that still request pullBase stop hitting schema errors; it returns the same base commit as comparedTo, with deprecation directing callers to comparedTo.

The Python resolver for comparedTo is also registered for pullBase, so both fields share the existing resolve_base logic (loading the commit via CommitLoader from pull.compared_to).

Reviewed by Cursor Bugbot for commit 7f36969. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov-notifications

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.65%. Comparing base (65af8ae) to head (7f36969).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2458   +/-   ##
=======================================
  Coverage   91.65%   91.65%           
=======================================
  Files        1341     1341           
  Lines       53342    53343    +1     
  Branches     1649     1649           
=======================================
+ Hits        48888    48889    +1     
  Misses       4133     4133           
  Partials      321      321           
Flag Coverage Δ
apiunit 94.02% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants