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.property | string | Edge property name to filter on. |
spec.min | number | Lower bound (inclusive). Default: -Infinity. |
spec.max | number | Upper bound (inclusive). Default: +Infinity. |
spec.on | string | string[] | '*' | Restrict to a subset of edge relationships. Default: '*' (all). |
spec.includeNull | boolean | Keep edges missing the property. Default: true. |
spec.invert | boolean | Invert pass/fail. Default: false. |
spec.id | string | Override 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",
});