We actually support uid() in both SUBJECT and OBJECT.
So the mutation is working.
The issue is in your query:
HAS_CONTACT is a relationship so you must query something from the related node to get a result
Just add
HAS_CONTACT @facets { uid }
as a result, you should get something like
{
"uid": "0xd",
"HAS_CONTACT|created_at": 1732640718
}
Let me know if that works.
BTW you can simplify the query to get the uids:
contact_query_{idx}(func: eq(phone, "{contact_user["phone"]}")) {{
contact_{idx} as uid
}}
is equivalent to
contact_{idx} as var (func: eq(phone, "{contact_user["phone"]}"))