MCPcopy Create free account
hub / github.com/NanGePlus/LightRAGTest / query_all_nodes

Function query_all_nodes

LightRAG/examples/lightrag_api_oracle_demo..py:208–215  ·  view source on GitHub ↗
(type: str = Query("nodes"), limit: int = Query(100))

Source from the content-addressed store, hash-verified

206
207@app.get("/data", response_model=Response)
208async def query_all_nodes(type: str = Query("nodes"), limit: int = Query(100)):
209 if type == "nodes":
210 result = await rag.chunk_entity_relation_graph.get_all_nodes(limit=limit)
211 elif type == "edges":
212 result = await rag.chunk_entity_relation_graph.get_all_edges(limit=limit)
213 elif type == "statistics":
214 result = await rag.chunk_entity_relation_graph.get_statistics()
215 return Response(status="success", data=result)
216
217
218@app.post("/insert", response_model=Response)

Callers

nothing calls this directly

Calls 4

get_all_nodesMethod · 0.80
get_all_edgesMethod · 0.80
get_statisticsMethod · 0.80
ResponseClass · 0.70

Tested by

no test coverage detected