Start from the problem you need to solve.
These recipes combine the documented core GORM model and query operators into common graph-persistence tasks. Advanced capabilities are documented separately. The core recipes that run against the published NuGet package are identified below; illustrative domain examples are not an assertion of provider parity.
Verified against the published GORM NuGet package
The complete C# cookbook builds and runs in CI using GORM 3.1.0-preview.1. It includes assertions for LINQ, typed traversals, relationship loading, two-hop navigation and SQL translation.
var tasks = await db.Set<DeveloperNode>()
.Where(x => x.Id == developerId)
.Outgoing<WorksOnEdge, ProjectNode>()
.ThenOutgoing<HasTaskEdge, TaskNode>()
.ToListAsync();
The sample uses an in-memory graph: it verifies the public .NET API and results, but does not execute generated SQL. See the SQL Server verification matrix for live provider coverage. The browser Playground is still an illustrative JavaScript preview, not the compiled runtime.
FREE · NO SERVERRun the verified cookbookCopy/paste the real, NuGet-only application.
Find direct dependencies of a service
var dependencies = await context.Set<ServiceNode>()
.Where(x => x.Id == serviceId)
.Outgoing<DependsOnEdge, ServiceNode>()
.ToListAsync();Use outgoing traversal when the current service is the source of a dependency relation.
TRY ITOpen in playgroundInspect the SQL Server Graph MATCH shape for this traversal.
Find everything that depends on a node
var dependents = await context.Set<ServiceNode>()
.Where(x => x.Id == databaseId)
.Incoming<DependsOnEdge, ServiceNode>()
.ToListAsync();This is useful for blast-radius questions where the selected node is the target of dependency edges.
Reconstruct topology at incident time
var historicalDependencies = await context.Set<ServiceNode>()
.AsOf(incidentStartedAt)
.Where(x => x.Id == serviceId)
.Outgoing<DependsOnEdge, ServiceNode>()
.ToListAsync();Use this pattern when current topology has already changed and you need to understand what was connected when an incident began.
The meaningful result is a historical graph, not current relationships combined with historical node state.
Load a domain object with related graph data
var person = await context.Set<PersonNode>()
.Include(x => x.Projects)
.SingleAsync(x => x.Id == personId);Prefer relationship loading when application code needs the connected object graph rather than a traversal result.
Keep operational queries bounded
var active = await context.Set<ServiceNode>()
.Where(x => x.State == ServiceState.Active)
.OrderBy(x => x.Name)
.Take(100)
.ToListAsync();Bounded reads reduce accidental fan-out and make interactive tooling more predictable. Combine them with deterministic ordering.
Split fast graph tests from provider verification
Use the in-memory execution path to validate domain behavior, traversal intent and deterministic scenarios without requiring SQL Server for every test.
Keep a focused SQL Server suite for translation, temporal semantics, concurrency and other provider-specific behavior.
The key is not to confuse provider-independent test speed with provider equivalence.
Analyze impact without mutating the graph
Graph Intelligence is intended to derive paths, affected topology and other analysis from ordinary GORM graph state. Keep that analysis read-only; an application should explicitly decide whether insight leads to a mutation.
Preview graph persistence work before applying it
The ChangeSet & transaction compiler is intended to make ordered writes, rollback semantics and conflicts inspectable before execution.
Traversal, Include, analysis or mutation planning?
Outgoing / IncomingYou are asking which nodes are connected through a specific path.Include / ThenIncludeYou want a connected object graph materialized.Graph IntelligenceYou want derived insight such as impact, centrality or routing; advanced API requires package-level verification.ChangeSetYou want persistence work to be inspectable; exact public API pending migration validation.