That’s nice.
Not sure If I got, Is your intention to keep two DBs in sync? That seems like a lot of work. As Dgraph is a GraphDB, it can be hard to sync it with a SQL DB. It is possible but feels hard.
It seems to me that you want to keep Dgraph as the main source of truth. And SQL as a copy? have a specific reason? And Yeah, some strategy with UID would be a nice way to deal with Dgraph.
How do you intend to use SQL in conjunction with Dgraph?
Take this read Migrating data from SQL to Dgraph - Dgraph Blog can be useful.
Cheers.