diggy
(Dgraph Bot)
September 27, 2018, 9:56pm
1
Moved from GitHub dgraph-js/42
Posted by aryzing :
When debug mod is turned on, the console output is not properly formatted. The newlines appear as the sequence \n
instead of actual newlines as shown in the following example output:
{"query":"\n query getByName($name: string) {\n getByName(func: anyofterms(name@., $name)) {\n expand(_all_)\n }\n }\n ","varsMap":[["name","Julia"]],"startTs":0,"linRead":{"idsMap":[]}}
diggy
(Dgraph Bot)
September 27, 2018, 10:21pm
2
danielmai commented :
That looks like the expected output. The query text itself contains newlines, but the entire debug output is in JSON as a single line.
diggy
(Dgraph Bot)
September 27, 2018, 10:49pm
3
aryzing commented :
What are the advantages of having it as is? I’d much prefer a formatted output for easier reading. Having the option to choose would be nice.
diggy
(Dgraph Bot)
September 27, 2018, 10:53pm
4
danielmai commented :
If the newlines weren’t escaped, the debug output wouldn’t be valid JSON and thus not parse-able.
You could process the query
key and print out the query if that’s what you need.