adding graphql integration

This commit is contained in:
2026-04-29 11:31:31 -04:00
parent 3a4ffce7a3
commit a41bd7716f
6 changed files with 170 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ router = APIRouter(prefix="/cellsites", tags=["cellsites"])
def get_cellsites() -> list[dict[Any, Any]]: # type: ignore
conn = db.connect_to_db()
try:
with db.connect_to_db() as conn:
with conn:
return db.get_cellsites(conn)
except Exception as e:
logger.error(f"Error fetching cellsites: {e}", exc_info=True)
@@ -23,7 +23,7 @@ def get_cellsites() -> list[dict[Any, Any]]: # type: ignore
def get_cellsite(id: int) -> list[dict[str, Any]]: # type: ignore
conn = db.connect_to_db()
try:
with db.connect_to_db() as conn:
with conn:
return db.get_cellsite(conn, id)
except Exception as e:
logger.error(f"Error fetching cellsite {id}: {e}", exc_info=True)