filter

filter.edges

Sugar API for filters that hide individual edges. Symmetric to filter.nodes but targets edges instead.

The returned FilterHandle has target: "edges" (plural — public-facing).

Notable differences vs nodes:

  • property: "relationship" is remapped to match edge.relationship (top-level field).
  • property: "id" maps to edge.id.
  • No _category shortcut — that's a node-only concept.
  • No degree() method — degree is a node-only metric.
  • The on: scope accepts relationship names instead of category names.

Endpoint visibility coupling (hiding an edge automatically when either endpoint is hidden by a node filter) is handled by the manager — see GraphFilterManager.applyEdgeVisibility. You only need an edge filter when you want to hide edges based on their own properties.

Methods

  • range — numeric range on a property
  • dateRange — date range on a property
  • match — categorical allowlist or regex (e.g. by relationship)
  • predicate — custom (edge) => boolean escape hatch

Common options

Every edge filter accepts the same common options as node filters:

Field Type Default Meaning
on string | string[] | '*' '*' Restrict the filter to a subset of edge relationships. '*' means all.
includeNull boolean true If true, edges missing the property are kept; if false, they are hidden.
invert boolean false Invert the filter's pass/fail result.
id string auto Override the auto-generated handle id.