UIDs will be unique if you get them from a var block, as can be seen below.
{
s as var(func: uid(0x1,0x2,0x3,0x1))
q(func: uid(s)){
uid
}
}
Result:
"data": {
"q": [
{
"uid": "0x1"
},
{
"uid": "0x2"
},
{
"uid": "0x3"
}
]
},