How can i compare tow graph in dgraph?

i want to compare two graph in degraph

how can i write the query

Dgraph makes no comparisons. But you can create a query with two query blocks and thus make the necessary comparison via application.

Multiple Query Blocks https://docs.dgraph.io/query-language/#multiple-query-blocks