feat: make repository reads alias-aware
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a049a4-ee9f-78e1-9d66-2cb0f9bea3e3
This commit is contained in:
parent
639b9aed08
commit
2e2ae1e5d0
19 changed files with 982 additions and 94 deletions
|
|
@ -23,6 +23,7 @@ from api.services.fabric_graph import (
|
|||
record_fabric_graph_error,
|
||||
split_graph_ingest_body,
|
||||
)
|
||||
from api.services.repository_aliases import resolve_repository_slug
|
||||
|
||||
router = APIRouter(prefix="/fabric", tags=["fabric"])
|
||||
|
||||
|
|
@ -157,7 +158,12 @@ async def list_graph_nodes(
|
|||
if domain:
|
||||
query = query.where(FabricGraphNode.domain_slug == domain)
|
||||
if repo:
|
||||
query = query.where(FabricGraphNode.repo_slug == repo)
|
||||
resolution = await resolve_repository_slug(session, repo, required=False)
|
||||
query = query.where(
|
||||
FabricGraphNode.repo_slug.in_(
|
||||
resolution.slug_values if resolution else (repo,)
|
||||
)
|
||||
)
|
||||
if canonical_category:
|
||||
query = query.where(FabricGraphNode.canon_category == canonical_category)
|
||||
if fabric_id:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue