Curiosity

Neighbors & Graph recipe

Source: 06_NeighborsGraph/ · three ways to walk the graph from the front-end.

What it teaches

Tab Component When to reach for it
Direct query Mosaik.API.Query.StartAt(...).Out(...).GetAsync() When you need the data in a Defer block or to feed something other than a list.
Neighbors Neighbors(() => query.GetUIDsAsync(), ...) When you want a list with search + facets, materialised lazily when the tab is opened.
Graph explorer GraphExplorerView.ComponentFor(uids: ...) When the relationships are the story — neighbours-of-neighbours, dependencies, social graphs.

The recipe page itself is presentation-only — live data needs real UIDs you have in your workspace. Copy-paste the snippets into a real INodeRenderer to see them work.

Direct query

var hits = await Mosaik.API.Query
    .StartAt(node)
    .Out(Edges.HasAuthor)
    .GetAsync(limit: 25);

Neighbors list

Neighbors(
    () => Mosaik.API.Query.StartAt(node).Out(Edges.HasAuthor).GetUIDsAsync(),
    title: "Authors")
    .WithFacets()

Graph explorer

GraphExplorerView.ComponentFor(uids: new[] { node.UID })

See also

© 2026 Curiosity. All rights reserved.