Skip to content

No query results in v2.0.0-rc1 / v1.1.0-rc2 (same query in Ratel works) #83

@jawr

Description

@jawr

Quite possibly another version mismatch issue, but I am not getting results back for a query (upsert blocks are working), and querying from ratel works.

docker image: dgraph:v1.1.0-rc2
dgo: v2.0.0-rc1 h1:753hWclPX4U+enGF0P+otArveffRAde1pm3prJ6gbxE=

code:

        query := fmt.Sprintf(`{ nameserver(func: eq(nameserver.name, %q)) { uid } }`, name)

        tx := p.client.NewReadOnlyTxn().BestEffort()
        defer tx.Discard(ctx)

        resp, err := tx.Query(ctx, query)
        if err != nil {
                return "", errors.Wrap(err, "Query")
        }

        log.Printf("query: %s, resp: %+v", query, resp)

output:

2019/08/26 08:01:12 query: { nameserver(func: eq(nameserver.name, "ns.buydomains.com")) { uid } }, resp: json:"{\"nameserver\":[]}" txn:<start_ts:1721348 > latency:<parsing_ns:5585 processing_ns:224733 encoding_ns:2963 >

Running the query in ratel works as expected:

{
  "data": {
    "nameserver": [
      {
        "uid": "0xe72c66"
      }
    ]
  },
  "extensions": {
    "server_latency": {
      "parsing_ns": 23370,
      "processing_ns": 3643589,
      "encoding_ns": 11415,
      "assign_timestamp_ns": 1320425
    },
    "txn": {
      "start_ts": 1721601
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions