Skip to content
Graph docs0.5

Getting started

Latest stable Based on Graph release 0.5.1

Consumers choose a bluetape4k-dependencies version. Do not pin a standalone graph module or bluetape4k-graph-bom version.

dependencies {
implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<ecosystem-version>"))
implementation("io.github.bluetape4k:bluetape4k-graph-tinkerpop")
}

The unversioned coordinate is intentional: the ecosystem BOM keeps graph and its shared Bluetape libraries aligned. See the release module declaration in graph/graph-tinkerpop/build.gradle.kts.

TinkerGraphOperations().use { ops ->
val alice = ops.createVertex("Person", mapOf("name" to "Alice"))
val bob = ops.createVertex("Person", mapOf("name" to "Bob"))
ops.createEdge(alice.id, bob.id, "KNOWS")
val neighbors = ops.neighbors(alice.id)
check(neighbors.single().id == bob.id)
}

The facade composition is visible in GraphOperations.kt, while the in-memory implementation and its behavior tests live in TinkerGraphOperations.kt and TinkerGraphOperationsTest.kt.

Inspect returned GraphElementId values rather than assuming a numeric ID. If the neighbor list is empty, verify edge direction, label filters, and maxDepth before blaming the backend. If a transaction extension throws UnsupportedOperationException, the selected implementation lacks that capability; it never silently falls back to auto-commit. Continue with paired APIs and backend selection.