From 8692cd13381204a98100fb296bf971ad14ea7a32 Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Wed, 15 Oct 2025 16:03:17 +0100 Subject: [PATCH] feat: add count_nodes and count_edges methods to GraphDBInterface --- .../infrastructure/databases/graph/graph_db_interface.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cognee/infrastructure/databases/graph/graph_db_interface.py b/cognee/infrastructure/databases/graph/graph_db_interface.py index 65afdf275..abfdff784 100644 --- a/cognee/infrastructure/databases/graph/graph_db_interface.py +++ b/cognee/infrastructure/databases/graph/graph_db_interface.py @@ -159,6 +159,14 @@ class GraphDBInterface(ABC): - get_connections """ + @abstractmethod + async def count_nodes(self) -> int: + raise NotImplementedError + + @abstractmethod + async def count_edges(self) -> int: + raise NotImplementedError + @abstractmethod async def query(self, query: str, params: dict) -> List[Any]: """