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.
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?
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.