atharrva01 opened a new pull request, #383: URL: https://github.com/apache/hugegraph-ai/pull/383
I found that vertex IDs containing apostrophes, like `1:O'Brien`, break Gremlin queries and silently cause graph RAG to lose its graph context. The same issue can also cause `/rag/graph` to return a 500. I added a `gremlin_str_literal()` helper to escape backslashes and apostrophes, and applied it wherever IDs or keywords are interpolated into Gremlin queries. Plain IDs behave as before. **Tests:** Added regression tests for the operator, node, and `get_vertex_details`. All three fail on `main` and pass with this fix. Module tests pass and Ruff is clean. **Note:** Live HugeGraph testing wasn't performed. Apostrophe removal during keyword extraction remains out of scope for this PR. Before / After: screenshots below. Before <img width="942" height="317" alt="image" src="https://github.com/user-attachments/assets/ebbc0fe3-7276-4a51-9619-d4266ee02fcf" /> After <img width="946" height="710" alt="image" src="https://github.com/user-attachments/assets/66ac076a-be5c-4577-9857-7604d6b40cae" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
