Skip to content

feat(graphql): allow owner query by ownerid - #2019

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/feat/graphql-owner-by-ownerid
Open

feat(graphql): allow owner query by ownerid#2019
sentry[bot] wants to merge 1 commit into
mainfrom
seer/feat/graphql-owner-by-ownerid

Conversation

@sentry

@sentry sentry Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This PR extends the owner GraphQL field to allow querying by ownerid in addition to username.

Previously, the owner field in the GraphQL API only accepted a required username: String! argument. This led to GraphQLError exceptions when clients attempted to query for an owner using an ownerid.

This change modifies the owner field to accept either username: String or ownerid: Int (both optional, but at least one must be provided). A new get_owner_by_id action was introduced, and the resolve_owner resolver was updated to handle both arguments, ensuring that the correct owner lookup is performed based on the provided identifier.

This resolves the issue where clients were unable to query owners by their numerical ID.

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

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

@thomasrockhu-codecov

Copy link
Copy Markdown
Contributor
✨ Harness AI Code Review View in Harness →

ℹ️ Review in progress — analyzing the changes on this pull request.
This comment updates automatically when the review finishes.

@codecov-notifications

codecov-notifications Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 56.25000% with 7 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/codecov-api/graphql_api/actions/owner.py 33.33% 4 Missing ⚠️
apps/codecov-api/graphql_api/types/query/query.py 70.00% 3 Missing ⚠️

📢 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 Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 56.25000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.62%. Comparing base (a8ec2db) to head (6adc4a9).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/codecov-api/graphql_api/actions/owner.py 33.33% 4 Missing ⚠️
apps/codecov-api/graphql_api/types/query/query.py 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2019      +/-   ##
==========================================
- Coverage   91.63%   91.62%   -0.02%     
==========================================
  Files        1336     1336              
  Lines       53230    53242      +12     
  Branches     1647     1647              
==========================================
+ Hits        48778    48783       +5     
- Misses       4131     4138       +7     
  Partials      321      321              
Flag Coverage Δ
apiunit 93.96% <56.25%> (-0.03%) ⬇️

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.

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.

1 participant