From aee664fce9ced120cde893da2b6f5c0603a0efdd Mon Sep 17 00:00:00 2001 From: FrozenPandaz Date: Fri, 23 Aug 2024 17:32:06 -0400 Subject: [PATCH] fix(core): add js docs to graph json --- docs/generated/devkit/GraphJson.md | 8 ++++++++ packages/nx/src/command-line/graph/graph.ts | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/docs/generated/devkit/GraphJson.md b/docs/generated/devkit/GraphJson.md index ac32cbf111dba..349d669498213 100644 --- a/docs/generated/devkit/GraphJson.md +++ b/docs/generated/devkit/GraphJson.md @@ -1,5 +1,7 @@ # Interface: GraphJson +The data type that `nx graph --file graph.json` or `nx build --graph graph.json` contains + ## Table of contents ### Properties @@ -14,14 +16,20 @@ • **graph**: [`ProjectGraph`](../../devkit/documents/ProjectGraph) +The project graph + --- ### taskPlans • `Optional` **taskPlans**: `Record`\<`string`, `string`[]\> +The plans for hashing a task in the task graph + --- ### tasks • `Optional` **tasks**: [`TaskGraph`](../../devkit/documents/TaskGraph) + +A graph of tasks populated with `nx build --graph` diff --git a/packages/nx/src/command-line/graph/graph.ts b/packages/nx/src/command-line/graph/graph.ts index 98aeef7d8aef5..ca8c4edda2284 100644 --- a/packages/nx/src/command-line/graph/graph.ts +++ b/packages/nx/src/command-line/graph/graph.ts @@ -1155,9 +1155,21 @@ function expandInputs( }; } +/** + * The data type that `nx graph --file graph.json` or `nx build --graph graph.json` contains + */ export interface GraphJson { + /** + * A graph of tasks populated with `nx build --graph` + */ tasks?: TaskGraph; + /** + * The plans for hashing a task in the task graph + */ taskPlans?: Record; + /** + * The project graph + */ graph: ProjectGraph; }