Documentation

Graphtia documentation · workflow

Dependents

Find code that relies on a selected entity.

Find who relies on the code you want to change

Dependents reverse the dependency question. Instead of asking what a module needs, ask which source entities rely on it. This is useful before changing an exported type, return value, validation rule or module boundary.

Example: tightening validation

typescript
// validation.ts
export function validateOrder(order: Order) {
  if (order.total <= 0) throw new Error('Order total must be positive');
}

A stricter validation rule can affect the checkout module that invokes it. That relationship identifies a consumer to inspect. The graph alone does not determine whether the stricter rule is correct for that consumer.

  1. Select the validation module and choose “Show dependents”.

  2. Read the direct consumer and identify the assumption being changed.

  3. Inspect further callers only when the changed behavior can cross that next boundary.

  4. Record relevant tests and unresolved cases before implementing the change.

Direct consumers and transitive reach

A direct dependent uses the selected entity. A transitive investigation continues through additional consumers. Expanding every reachable node is not always useful: a type rename and a change in failure behavior can require different review scopes.

A change has a direction

A validation change can affect its checkout consumer and the tests associated with that consumer. Reachability identifies candidates for review; it does not prove a defect.

Validation changeSelected source
01
CheckoutDependent module
02
Order contractBoundary to inspect
03
Checkout testsReview candidates
04
Review scopeInspect source evidence
05
Change → potential dependents → review candidates

Graphtia

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

Join waitlist