Problem
Clients exploring an unfamiliar schema need a generic way to retrieve one entity and its immediate graph context. Existing typed traversals work when edge types are known, but there is no generic bounded expansion surface.
Proposed change
Accept a typed entity selector (type plus stable ID or declared key), edge/type/direction filters, requested display properties and explicit bounds. Return the root entity, edge identities/properties/direction, and neighbor identities/display fields in one consistent snapshot.
Define pagination and truncation signals. Start with a one-hop contract, or explicitly bound depth and visited/result counts if supporting more. Preserve parallel edges and self-loops with clear semantics; do not collapse relationships solely by endpoint pair.
Acceptance criteria
- Clients can expand a root without fetching and compiling the full schema first.
- Zero-neighbor roots return successfully; multiple edge types and parallel edges retain identity.
- Results obey entity/property authorization and a single graph snapshot.
- High-degree nodes have bounded memory/response size, stable pagination and visible truncation.
- Type-qualified selectors prevent collisions between identical keys on different node types.
This is separate from adding optional joins or edge unions to GQ, though those may help implementation. Existing API: openapi.json; query execution: exec/query.rs.
Problem
Clients exploring an unfamiliar schema need a generic way to retrieve one entity and its immediate graph context. Existing typed traversals work when edge types are known, but there is no generic bounded expansion surface.
Proposed change
Accept a typed entity selector (type plus stable ID or declared key), edge/type/direction filters, requested display properties and explicit bounds. Return the root entity, edge identities/properties/direction, and neighbor identities/display fields in one consistent snapshot.
Define pagination and truncation signals. Start with a one-hop contract, or explicitly bound depth and visited/result counts if supporting more. Preserve parallel edges and self-loops with clear semantics; do not collapse relationships solely by endpoint pair.
Acceptance criteria
This is separate from adding optional joins or edge unions to GQ, though those may help implementation. Existing API: openapi.json; query execution: exec/query.rs.