neighborhood

fun neighborhood(entityId: String, depth: Int = 1, minAuthority: AuthorityTier? = null): GraphNeighborhood

The entity neighbourhood reachable from entityId within depth hops.

Routes to a native GraphQueryCapable store for unscoped queries, and for context-scoped queries when the store declares GraphQueryCapable.honorsContextFilter; otherwise builds the neighbourhood from bounded BFS over ACTIVE proposition edges. The context is passed straight into the native context-aware method, which confines the walk in its own engine. This query's own maxDepth ceiling goes along with it, so a native backend clamps its walk to the same bound the portable path enforces rather than a value it hardcodes itself.

When minAuthority is set, the query routes to a native GraphQueryCapable store only if that store declares GraphQueryCapable.honorsAuthorityFilter — letting a graph backend apply the floor in its own engine. Otherwise the filter runs on the portable proposition-edge path, re-resolving authority from provenance at query time, so the result is correct even on a backend that ignores authority.

Legacy-edge behaviour: propositions with no provenance entries resolve to AuthorityTier.UNKNOWN (ordinal 3, the weakest tier). Because every named minAuthority floor has a lower ordinal than AuthorityTier.UNKNOWN, those edges are always dropped when any minAuthority is set — even a floor of AuthorityTier.DERIVED. If you need to retain provenance-free edges alongside authority-filtered ones, query without minAuthority and filter the result yourself.