Skip to content

@graphty/graphty-element / session / SetDefinition

Type Alias: SetDefinition ​

SetDefinition = { edges?: readonly EdgeMember[]; kind: "fixed"; nodes: readonly NodeId[]; reading: "induced" | "listed"; } | { kind: "rule"; reading: EdgeReading; where: Query | RuleTree; } | { directed?: boolean; edges?: readonly (EdgeMember | readonly EdgeMember[] | null)[]; kind: "path"; nodes: readonly NodeId[]; }

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 read induced stores 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, read listed.

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? ​

readonly optional edges?: readonly EdgeMember[]

Canonical order, no duplicates. Only edges listed explicitly; an induced set derives its edges.

kind ​

readonly kind: "fixed"

nodes ​

readonly nodes: readonly NodeId[]

Canonical order, no duplicates.

reading ​

readonly reading: "induced" | "listed"


Type Literal ​

{ kind: "rule"; reading: EdgeReading; where: Query | RuleTree; }

kind ​

readonly kind: "rule"

reading ​

readonly reading: EdgeReading

where ​

readonly where: Query | RuleTree

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? ​

readonly optional directed?: boolean

Steps must follow declared edge direction. Default false.

edges? ​

readonly optional edges?: readonly (EdgeMember | readonly EdgeMember[] | 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 ​

readonly kind: "path"

nodes ​

readonly nodes: readonly NodeId[]

The walk, in order.