apache / age-viewer

Graph database optimized for fast analysis and real-time data processing. It is provided as an extension to PostgreSQL.
https://age.apache.org
Apache License 2.0
237 stars 236 forks source link

Nodes between edges and vice versa #77

Open bruinend opened 1 year ago

bruinend commented 1 year ago

Describe the bug Edges are shown and treated as nodes?

To Reproduce PG admin create node code: Create node 1 and create node 2 Create Edge.

Code used:

SELECT * from cypher('metadata_graph1', $$ CREATE (n:datapipeline {name: 'DP: test' , id: 'DP9' , description : 'sftp from a to b', status: 'In Service'}) RETURN n $$) as (V agtype)

SELECT * from cypher('metadata_graph1', $$ CREATE (n:datastore {name: 'NLTLD2DW' , id: 'DS6' , description : 'datastore legacy server', status: 'In Service'}) RETURN n $$) as (V agtype)

SELECT * from cypher('metadata_graph1', $$ MATCH (a: datapipeline{id: 'DP9'}), (b: datastore {id: 'DS6'}) CREATE (a)-[r:IS_LOCATED_ON {weight: 1, tag: 'twamp'}]->(b) return r $$) as (V agtype)

Expected behavior 2 nodes in overview (datastore and datapipeline) 1 Edge in edge overview: IS_LOCATED_ON

Screenshots In the printscreen I ran the create Edge code twice. You can see clearly the EDGE is shown in the Node section? When you click on the edge to produce cypher to query it, it treats the EDGE as a Node?

image

After clicking on IS_LOCATED _ON to query:

image

Desktop (please complete the following information):

Additional context AG viewer is the latest code used in a compose with Postgres Apache AGE / PG admin and jupyter lab. Also the Graph selector is not working properly when creating code with Jupyter lab. It selects the wrong one , or the leading grapgh is undefined? All in all I think this product is not fit for use in a big company we want to use it in :( I already created an Edge bug before (not visible) which is still existing.

JinHyukM3 commented 1 year ago

Hi @bruinend,

I also posted the same bug here https://github.com/apache/age-viewer/issues/71#issue-1465536488 and I believe https://github.com/apache/age-viewer/pull/75#issue-1468701049 should fix this bug, but merge is still in progress.