0

I am working on a task to visualize the schema of a graph inside a database in age viewer. So I need an abstract visualization that shows all the unique nodes inside a graph, and possible edges in between those nodes.

For example in agCloud at https://agcloud.bitnine.net/ when we create a new project using some sample data, the first launch of the AgViewer gives the abstract visualization of the graph. as can be seen here.

enter image description here

So it shows 3 unique nodes and all possible unique edges.

How can we show the same visualization in AgeViewer? Is there any pre-build feature to do so in AgeViewer? or do we need to implement it from scratch?

Kamlesh Kumar
  • 351
  • 1
  • 7

2 Answers2

1

It seems like AgViewer creates a visualization based on the table result instead of through the graph option, which will only show up if the output consists solely of node and edge objects. I suspect you will have to implement this from scratch by converting the result you get from the following query into a visualization:

SELECT * FROM cypher('graph_name', $$
    MATCH (n)-[r]->(m)
    RETURN DISTINCT label(n), label(r), label(m)
$$) as (n agtype, r agtype, m agtype);

As this outputs string values instead of node and edge objects, nothing will show up on the graph tab but will show the desired results in the table tab, however you can temporarily make an exception only when the :server status command is entered.

Ken W.
  • 397
  • 1
  • 13
  • what does ':server status' command do? – Kamlesh Kumar Jul 19 '23 at 06:53
  • It is the default command that is sent when you successfully connect to a database. In AgViewer it shows information about the connection status and is also responsible for displaying the visualization that you are seeking to replicate. – Ken W. Jul 19 '23 at 19:07
-1

To get view the abstract-level graph, run the following in the query editor: $:server status. Hope that helps!