Unify GQL scoped query naming: remove `_scoped_` infix
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
Unify GQL scoped query naming convention by removing the `_scoped_` infix pattern.
Currently two naming patterns coexist for scope-based GQL queries:
Pattern 1 (majority, ~20 queries): _
- domain_projects_v2, domain_users_v2, project_users_v2
- rg_domains_v2, project_resource_allocation_v2
- domain_usage_buckets, project_usage_buckets
- rg_domain_usage_buckets, rg_project_usage_buckets, rg_user_usage_buckets
- domain_fair_shares, project_fair_shares
- rg_domain_fair_shares, rg_project_fair_shares, rg_user_fair_shares
Pattern 2 (minority, 4 queries): _scoped_
- session_scoped_scheduling_histories (scheduling_history/resolver.py)
- deployment_scoped_scheduling_histories (scheduling_history/resolver.py)
- route_scoped_scheduling_histories (scheduling_history/resolver.py)
- image_scoped_aliases (image/resolver.py)
Proposed renaming (remove _scoped_ to match pattern 1):
- session_scoped_scheduling_histories -> session_scheduling_histories
- deployment_scoped_scheduling_histories -> deployment_scheduling_histories
- route_scoped_scheduling_histories -> route_scheduling_histories
- image_scoped_aliases -> image_aliases
This is a GQL schema-breaking change - coordinate with frontend team on migration.
JIRA Issue: BA-5501
Contributor guide
Research direction
Start by reading scheduling_history/resolver.py and image/resolver.py, where the four scoped query names are defined. Coordinate the frontend migration for this schema-breaking change, then verify that the queries use session_scheduling_histories, deployment_scheduling_histories, route_scheduling_histories, and image_aliases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, python
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100