kuzudb / explorer

Browser-based user interface for Kùzu graph database
https://hub.docker.com/r/kuzudb/explorer
MIT License
29 stars 5 forks source link

Double clicking on a node a does not create the edge to b if b is already displayed #155

Closed semihsalihoglu-uw closed 2 months ago

semihsalihoglu-uw commented 2 months ago

I am working on an example where there are Account, Person, and Address nodes. There is a Person node P1 with email "eth2ochoa@yahoo.com", that should have a LivesIn edge to an Address node A1 with value "953 Kyle Loop, Johnview, MT 59065". I'm playing around with double clicking on nodes to expand to their neighborhoods. Suppose A1 is already displayed on the panel, e.g., because I double clicked on the other Person node P2 that lives in the same address. Then if I click on P1, it will not generate the LivesIn edge to A1.

Some images:

1) This is the case when A1 is not on the screen and double clicking on P1 correctly puts A1 and the P1-[LivesIn]->A1 edge on the panel.

Screen Shot 2024-07-04 at 12 47 54 PM

2) This is the case when both A1 and P1 are already on the panel and double clicking does not do anything.

Screen Shot 2024-07-04 at 12 53 14 PM
mewim commented 2 months ago

We run a query:

MATCH (src:${tableName}) -[r]- (dst) WHERE src.${primaryKey} = $pk RETURN r, dst LIMIT ${sizeLimit}

to randomly sample from the neighborhood of a node when double clicking. Currently we filter out rows with destionations that already exist in the graph before processing. I disable this behavior in #162. However, due to the sizeLimit when the graph is large, it does not guarantee to always be able to add the edges.

mewim commented 2 months ago

If the behavior of always automatically connecting all the nodes on double clicking is required. Please reopen this issue.