Pond-wide link graph endpoint #111
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#111
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The knowledge graph needs one pond-scoped read of nodes and wikilink edges. Backlinks and phantom links already live in
apps/api/src/links/with per-page permission filtering — this is an extension of that service, not a new module.Scope
GET /ponds/:pondId/links(links.controller.ts,@RequiresPondRole('reader')) returning:nodes: readable, non-trashed pages (id,title,slug,labelIds),edges: resolvedpage_linksrows as{ from, to }— an edge is included only when both endpoints are readable,phantoms:{ targetSlug, referencedBy: pageId[] }with unreadable referrers dropped (a phantom disappears entirely when no readable referrer remains).permissions.filterPagespath the existingbacklinks()/phantomLinks()use.PondGraphViewtypes inpackages/shared/src/links.ts.Acceptance criteria
Technical notes
page_linksalready has everything (from_page_id, nullableto_page_id,target_slug); no schema change.Dependencies
None.
Size
~0.5–1 day.
Implemented in
e957c2a.GET /ponds/:pondId/linksreturns the caller's readable slice in one read: nodes (id/title/slug/labelIds), resolved edges deduplicated per direction (rename leftovers collapse), and phantoms with their referrer ids. An edge survives only when both endpoints are readable; a phantom disappears with its last readable referrer; trashed pages are excluded. DB tests cover the owner graph, the label-DENY reader slice, dedupe, and trash exclusion.