Skip to content

Filter may override root query in v0.8.1 #1455

@zhicwu

Description

@zhicwu

Steps to reproduce:

  • schema and test data
mutation {
  schema {
    test_key: string @index(exact) .
    test_value: string @index(exact) .
  }
  set {
    _:test_1 <test_key> "key1" .
    _:test_1 <test_value> "value1" .
    _:test_2 <test_key> "key2" .
    _:test_2 <test_value> "value2" .
  }
}
  • query
{
  v as var(func: eq(test_key, "key1")) @filter(eq(test_key, "key2"))
}
{
  q(func: uid(v)) {
    test_key
    test_value
  }
}
  • actual response - should be empty?
{
  "data": {
    "q": [
      {
        "_uid_": "0x11945",
        "test_key": "key2",
        "test_value": "value2"
      }
    ],
    "server_latency": {
      "processing": "310µs",
      "json": "104µs",
      "total": "604µs",
      "parsing": "184µs"
    }
  }
}

Metadata

Metadata

Assignees

Labels

kind/bugSomething is broken.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions