Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在查询 dgraph 以获取用户的详细信息,但它返回一个数组,其中一个对象的键 uid 和值作为我查询的“uid_string”,即使不存在具有该 uid 的用户。
查询:
{ User(func: uid(0x44)) { uid name } }
我得到的结果:
"User": [ { "uid": "0x44" } ]
预期的结果应该是:
"User": []
该uid()函数就像一个标识函数:它将返回给您指定的 uid,无论它是否有任何传入或传出边。
uid()
没有任何边的 uid 实际上是一个孤立节点,并且不会影响数据在 Dgraph 中的存储或查询方式。