fix: handle KuzuDB dict-based results in Playground visualization#723
Open
tucaman wants to merge 1 commit intoCodeGraphContext:mainfrom
Open
fix: handle KuzuDB dict-based results in Playground visualization#723tucaman wants to merge 1 commit intoCodeGraphContext:mainfrom
tucaman wants to merge 1 commit intoCodeGraphContext:mainfrom
Conversation
KuzuDB returns plain Python dicts for nodes and relationships, not Neo4j/FalkorDB-style objects with .labels, .id, .start_node attributes. This caused get_graph() to produce nodes with random IDs (Python memory addresses) and 0 edges (source/target always None). Add isinstance(node/rel, dict) checks to get_graph() that read _id, _label, _src, _dst dict keys directly. Uses table:offset composite keys for consistent node/edge ID matching. All existing Neo4j/FalkorDB code paths are preserved unchanged. Fixes CodeGraphContext#722
|
@tucaman is attempting to deploy a commit to the shashankss1205's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_graph()inviz/server.pyassumed object attributes (.labels,.id,.start_node)Fix
_kuzu_id()helper to convert{'table': N, 'offset': M}to stable"N:M"string keysisinstance(node, dict)/isinstance(rel, dict)branches inget_graph()_id,_label,_src,_dst) directlyTest Results
Edge types recovered: CONTAINS, IMPORTS, HAS_PARAMETER
Environment
Fixes #722