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);
}

Start wide. Follow a concrete relationship.

Use the graph to choose a useful scope, then inspect the source behind the part that matters.

  1. Choose a part of the system. Start from the project overview and select a module or other supported structural node.

  2. Narrow the view. Open its indexed structure. Use the available depth and relationship controls, and keep filtered or partial-view notices in sight.

  3. Read the evidence. Open the source and its Evidence view. Check the source-match notice before relying on the highlighted location.

A verified source match does not make every relationship complete or prove runtime behavior.

Connect the graph to the file

Explorer on Windows with checkout-service.ts selected, verified TypeScript source, file tree, inspector and a filtered graph.
The commerce-platform example is locally indexed. The source pane verifies checkout-service.ts against the published revision, while the graph identifies its filtered scope: seven nodes and eight relationships in view.

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