Skip to content
Tools/Spec Introspection/resolve_edge_for_pair

resolve_edge_for_pair

Resolve the canonical `UPGEdgeType` for a `source_type` → `target_type` containment pair. Wraps `resolveContainmentEdge` / `UPG_EDGE_PAIR_MAP`. Adapter-critical: every import adapter (Markdown, Notion, Linear, GitHub) uses it to look up the right `_contains_` edge before falling back to a polymorphic edge. Returns `{ edge_type: null }` when the pair is uncatalogued.

Spec Introspectionatomic (read-only)

Arguments

source_typestringrequired

Parent / source entity type.

target_typestringrequired

Child / target entity type.

Returns

Shape
{ source_type, target_type, edge_type: string | null, anchor_hint?, alternate_anchors?, adjacent_edges? }

Examples

Live call against the Notion example graph.

Input

{
  "source_type": "example",
  "target_type": "example"
}

Output

{
  "source_type": "example",
  "target_type": "example",
  "edge_type": null
}

Warnings

Returns `edge_type: null` when no canonical pair is registered. Adapters MUST fall back to a polymorphic edge or skip the relationship, not synthesise a non-canonical key.

See Also