@graphty/graphty-element / session / SetDefinition
Type Alias: SetDefinition ​
SetDefinition = {
edges?: readonlyEdgeMember[];kind:"fixed";nodes: readonlyNodeId[];reading:"induced"|"listed"; } | {kind:"rule";reading:EdgeReading;where:Query|RuleTree; } | {directed?:boolean;edges?: readonly (EdgeMember| readonlyEdgeMember[] |null)[];kind:"path";nodes: readonlyNodeId[]; }
Defined in: graphty-element/src/catalog/types.ts:1151
What a set holds.
fixed: a member list. Ids, never row indices; ids the graph no longer holds read missing and are never pruned. A fixed set readinducedstores no edges unless some were listed.rule: a query or a rule tree, re-evaluated as the data changes.path: a walk, in order, node-first. Repeats allowed; one node is a zero-length path. It resolves to its distinct nodes and the edges its steps name, readlisted.
OPEN UNION: kinds may be added in a minor release; handle unknown kinds.
Union Members ​
Type Literal ​
{ edges?: readonly EdgeMember[]; kind: "fixed"; nodes: readonly NodeId[]; reading: "induced" | "listed"; }
edges? ​
readonlyoptionaledges?: readonlyEdgeMember[]
Canonical order, no duplicates. Only edges listed explicitly; an induced set derives its edges.
kind ​
readonlykind:"fixed"
nodes ​
readonlynodes: readonlyNodeId[]
Canonical order, no duplicates.
reading ​
readonlyreading:"induced"|"listed"
Type Literal ​
{ kind: "rule"; reading: EdgeReading; where: Query | RuleTree; }
kind ​
readonlykind:"rule"
reading ​
readonlyreading:EdgeReading
where ​
A JMESPath predicate over nodes, or a rule tree (RuleTree).
Type Literal ​
{ directed?: boolean; edges?: readonly (EdgeMember | readonly EdgeMember[] | null)[]; kind: "path"; nodes: readonly NodeId[]; }
directed? ​
readonlyoptionaldirected?:boolean
Steps must follow declared edge direction. Default false.
edges? ​
readonlyoptionaledges?: readonly (EdgeMember| readonlyEdgeMember[] |null)[]
Optional; when present, exactly nodes.length - 1 entries. Entry i names the edge, or the group of parallel or reciprocal edges, joining nodes[i] and nodes[i + 1]. null: every edge between that pair.
kind ​
readonlykind:"path"
nodes ​
readonlynodes: readonlyNodeId[]
The walk, in order.