I still do not understand your purpose. It’s clear what it says, but for me it’s vague when what the Dgraph can do for you. In Dgraph there is no comparison of strings as far as I know (except for password comparison https://docs.dgraph.io/query-language/#extended-types). You can make two query blocks and then compare in your application. I think that would be the most Dgraph could do for you on this issue.
This your sample query may work, but it is not accurate as to the user’s identity. Having said that, I do not understand the intent.
@omurbekjk all identification needs to be unique. That way either you need to create your aproach in your bussines-logic(aplication layer) or you use the Dgraph functionality in connecting nodes trought UID.
For example, you will aways have more than one John. Soon that identification you need to compare needs to be unique.
Instead of sending “john” you could send the UID of John’s node. Since it seems to me that in this last query you want to queue. A queue of logged users right?
One note, in your query you are using two query blocks. The first must be “var” to be a variable block.
I’m not sure if this query below can work. I did not test it.
var(func: has (logging_status))
n_Results AS logger_name
query (func: has (loggers)) @filter (allofterms (name, n_Results))