Skip to main content
Version: latest

agrag.ingestion.community.fetch_relation_edges

fetch_relation_edges(graph_store:GraphStore, *, page_size:int = 5000) -> list[WeightedEdge]

Return every live domain relation as a weighted edge tuple.

Weight is len(source_chunk_ids) (attestation count). A relation with no attested chunks contributes weight 0.0, so an unsupported edge cannot inflate clustering or a community report importance. Two entities connected by more than one distinct relation type contribute one edge tuple per type. graspologic_native sums parallel-edge weights when it builds its own adjacency.

Pages by keyset on (a.id, b.id, type(r), r.id).

Parameters:

  • graph_store (GraphStore) – Where the relations are read from.
  • page_size (int) – Rows fetched per page.

Returns:

  • list[WeightedEdge] – Edge tuples as (source_id_str, target_id_str, weight, rel_type).