Skip to content

func: uid() always returns data, even if node does not exist #2086

@aryzing

Description

@aryzing

Queries with func: uid(<the_id>) always return a node, even if the node does not exist. Is this the expected bahavior?

  • What version of Dgraph are you using?
    1.0.2

  • Have you tried reproducing the issue with latest release?
    yes

  • Steps to reproduce the issue (command/config used to run Dgraph).
    Issue query:

{
  random_node(func: uid(0x123abc456def)) {
    uid
  }
}
  • Expected behaviour and actual result.
    Expected The random_node query should be an empty array
    Actual There's an object representing the queried id, but that node does not exist!
{
  "data": {
    "random_node": [
      {
        "uid": "0x123abc456def"
      }
    ]
  },
  "extensions": {
    "server_latency": {
      "parsing_ns": 13761,
      "processing_ns": 24076,
      "encoding_ns": 336092
    },
    "txn": {
      "start_ts": 50096,
      "lin_read": {}
    }
  }
}

Metadata

Metadata

Assignees

Labels

kind/questionSomething requiring a response.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions