Documentation

Graphtia documentation · concept

The code graph

Read code relationships as evidence you can inspect.

Nodes identify things; edges explain relationships

A code graph represents source entities such as files, modules and symbols, along with directed relationships between them. Two entities with similar labels can be different nodes. Their path, kind and source location are part of the identity.

From entry point to supporting code

The checkout entry point reaches a service, its payment and order dependencies, a validation contract and a test. Lines illustrate static relationships, not runtime execution.

Entry pointcheckout.test.ts
01
Checkout servicecheckout-service.ts
02
Payment gatewaypayment-gateway.ts
03
Order moduleorder-service.ts
04
Validation contractvalidation.ts
05
Related checkscheckout.test.ts
06
Selected module · Static relationships · Supporting checks

Read one connection before expanding

In commerce-platform, checkout-service.ts imports payment-gateway.ts. That import is a source-level relationship. It does not say that every exported payment function is called on every checkout path. A call, a reference and a module dependency answer different questions.

typescript
// checkout-service.ts
import { getOrder, markOrderPaid } from './order-service';
import { authorizePayment } from './payment-gateway';
import { validateOrder } from './validation';

export function checkout(orderId: string) {
  const order = getOrder(orderId);
  validateOrder(order);
  const payment = authorizePayment(order);
  if (!payment.approved) throw new Error('Payment was declined');
  return markOrderPaid(order, payment.reference);
}

Connect the graph to the file

Graphtia Explorer with checkout-service.ts selected, its actual TypeScript source and surrounding relationships.
The selected module, graph, file tree and source belong to the same locally indexed commerce-platform example.

The selected module stays identifiable in the tree and inspector. The source panel lets you check the import and surrounding implementation instead of guessing the meaning of a line in the graph. A file can also contain several symbols with their own relationships.

Avoid reading density as certainty

A dense graph is not necessarily complete. Nodes or edges can be outside the current view, outside the query budget or outside the analyzer’s static coverage. Choose a specific relationship and inspect its source evidence before using it to justify a change.

Graphtia

This page is on its way. Join the waitlist to hear what’s next for Graphtia.

Join waitlist