From a854e4f42689d7c7fb567c6e4b62443fbb818b19 Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Wed, 15 Oct 2025 17:22:51 +0100 Subject: [PATCH] chore: update GraphDBInterface to not throw NotImplementedError for count_nodes() --- cognee/infrastructure/databases/graph/graph_db_interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cognee/infrastructure/databases/graph/graph_db_interface.py b/cognee/infrastructure/databases/graph/graph_db_interface.py index a4542cefe..d7542eac6 100644 --- a/cognee/infrastructure/databases/graph/graph_db_interface.py +++ b/cognee/infrastructure/databases/graph/graph_db_interface.py @@ -161,7 +161,8 @@ class GraphDBInterface(ABC): @abstractmethod async def count_nodes(self) -> int: - raise NotImplementedError + logger.warning("count_nodes is not implemented") + return 1 # dummy value to not fail search() @abstractmethod async def query(self, query: str, params: dict) -> List[Any]: