How to create a meta graph (not only for visualization!) and compare it to another meta graph automatically


I would like to create a meta graph of my graph database to work with this meta model. The APOC procedure 'CALL apoc.meta.graph()' only creates a virtual graph so that you can't query it with cypher (it's only for visualization). Since I would like to run queries on the meta graph I search for a method to create the meta graph. I found this blog post

but I ask myself if there exists any new function meanwhile.

Besides, I would like to compare the meta graph to another meta graph meaning that I want to know the differences between the meta structures. Is there any procedure that helps to compare two graphs automatically?

Thanks a lot for your help!

it is a challenging task to compare two graphs.
It is not exactly the same use case, but when I used graph comparison in my java tests, I used GraphAware's resttest plugin, where you can validate that the graph DB is the same as you expect. It is useful in simple test cases. And you have to know the shape of one graph and you can assert it to the DB.

If you are about to code it in java, then it can be useful:

Another solution may fit better into your use case is to use cypher (and APOC), and hash your stuff with md5.

APOC provides some node comparison and fingerprinting as well:

I hope it helps, maybe you have to combine these solutions.

1 Like