# core/steps/graph.step.ts

> 14 lines of code and 2 definitions.

Tree: Bane's Lab Build Scripts
Language: typescript
Layer: application
Canonical: https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-steps-graph-step-ts
Source text: https://banes-lab.com/source/build-scripts/core/steps/graph.step.ts.txt

Listed in [core/steps](https://banes-lab.com/api/source/build-scripts/core/steps.md), after [core/steps/diagram.step.ts](https://banes-lab.com/source/build-scripts/core/steps/diagram.step.ts.md) and before [core/steps/icons.step.ts](https://banes-lab.com/source/build-scripts/core/steps/icons.step.ts.md).

## Definitions

- `run` (method_definition, line 13)
- `GRAPH` (lexical_declaration, line 6)

## Contained in

- [core/steps](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-steps.md)

## Uses

- [core/coordinators/graph.coordinator.ts](https://banes-lab.com/source/build-scripts/core/coordinators/graph.coordinator.ts.md)
- [core/guards/site.guard.ts](https://banes-lab.com/source/build-scripts/core/guards/site.guard.ts.md)

## Linked from

- [core/coordinators](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-coordinators.md)
- [core/guards](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-guards.md)

## Source

```typescript
import { absolutePath } from "@ssot/paths";
import { defineStep } from "#core/factories/step.factory";
import { deriveGraph } from "#core/coordinators/graph.coordinator";
import { ontologyOf } from "#core/guards/site.guard";

const GRAPH = "graph";

defineStep({
    cache: null,
    name: GRAPH,
    needs: ["ontology", "metrics", "links"],
    phase: "start",
    async run(state) {
        return { gives: {}, line: await deriveGraph(absolutePath("app.member"), ontologyOf(state, GRAPH)) };
    },
});
```
