Hey @maubertin
Interesting usage
From my point of view if you have a tree structure then choosing to store that in a graph database is a good choice and it looks like you already made that choice.
About comparing these 2 snapshots: I think it is not that much related to database, the database role here is to help you insert these snapshots and query them efficiently. I should add that with the tools dgraph offers you can easily implement a lambda function to do this comparison and returning the result.
Also your usage is somehow like a version control system like Git. TerminusDB is claiming that their database works like that.
They have a diff and patch cloud offering too.You can do this JSON comparison in lambda function too, it is not a big deal I guess.