@graphty/graphty-element / session / resultPath
Function: resultPath() ​
resultPath(
runId,field?):string
Defined in: graphty-element/src/session/results/types.ts:72
The published path of one run's field.
This is the PATH form, which is what the path member of a selector takes:
ts
{ match: "has", path: resultPath(run.id, "value") }Inside an expression it must be quoted first. A run id carries its algorithm's name, a great many algorithm names carry a hyphen -- "shortest-path", "min-cut" -- and the expression lexer reads a bare hyphen as arithmetic, so the whole selector is refused. Wrap it once and the problem cannot arise:
ts
import { quotePath, resultPath } from "@graphty/graphty-element/session";
const where = `${quotePath(resultPath(run.id, "value"))} >= \`3\``;Parameters ​
runId ​
string
The run that produced the value.
field? ​
string
The field name; omit it to address the run's whole result object.
Returns ​
string
The path, such as "results.louvain.group".