Skip to content
Graph docs0.5

Ktor graph integration

Latest stable Based on Graph release 0.5.1

This example exposes graph reset, count, and route queries through a Ktor plugin and HTTP boundary. It uses TinkerGraph to isolate modeling from container and network variance. Read core model, TinkerPop, and Ktor integration first.

  • Nodes: City
  • Edges: ROAD
  • Key properties: name, distance

Use JDK 21, commit 3e0fa7cb9e3bc70c2743aeebda2487f3e45e4907, and the checked-in wrapper. Examples are not published; run this release fixture as a Gradle project from the release source checkout. In a consumer application, select only bluetape4k-dependencies:<ecosystem-version> and add the required graph module without an individual version.

Terminal window
./gradlew :ktor-graph-examples:test --tests "io.bluetape4k.graph.examples.ktor.KtorGraphAppTest"

The route tests assert that reset reports reset, the fixture contains three cities, and the path is Seoul -> Daejeon -> Busan. A failure should be split between plugin initialization, route serialization, and graph fixture/traversal behavior.

  1. Schema
  2. Service
  3. Complete executable test
  4. Build file

Continue from supply-chain-graph, then read code-graph. Also see paired APIs, testing, and operations.

Add one result-changing edge and assertion; repeat through the suspend API; then run a persistent-backend concrete test serially. Add disconnected and malformed inputs as diagnostics. This fixture does not prove throughput, clustering, authorization, tenant isolation, migration, backup, remote-driver timeout, or index quality.

These diagrams are loaded directly from README assets published with the 0.5.1 release and pinned to its immutable commit. They describe this manual’s released structure and runtime flows, not later Snapshot changes. Select a preview to open the SVG at the same release commit.

ktor graph examples architecture

Release README: examples/ktor-graph-examples/README.md

ktor graph examples data flow

Release README: examples/ktor-graph-examples/README.md

ktor graph examples ERD

Release README: examples/ktor-graph-examples/README.md