filteredges

filter.edges.range

range(spec: RangeSpec): FilterHandle<RangeSpec>

Numeric range filter on an edge property.

Hides edges whose property value falls outside [min, max]. Omitted bounds default to -Infinity / +Infinity. on restricts the filter to a subset of relationships (default = all).

spec.propertystringEdge property name to filter on.
spec.min numberLower bound (inclusive). Default: -Infinity.
spec.max numberUpper bound (inclusive). Default: +Infinity.
spec.on string | string[] | '*'Restrict to a subset of edge relationships. Default: '*' (all).
spec.includeNull booleanKeep edges missing the property. Default: true.
spec.invert booleanInvert pass/fail. Default: false.
spec.id stringOverride the auto-generated handle id.

Returns: FilterHandle<RangeSpec>

Example

// Hide WORKS_AT edges with low weight
const strong = api.filter.edges.range({
  property: "weight",
  min: 5,
  on: "WORKS_AT",
});