| 1 | import type * as neptunegraph from "@distilled.cloud/aws/neptune-graph"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Graph } from "./Graph.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `GetGraphSummary` operation (IAM action `neptune-graph:GetGraphSummary`), |
| 8 | * scoped to one {@link Graph}. |
| 9 | * |
| 10 | * Reads the data summary of the bound graph — node/edge counts, labels, and (in `DETAILED` mode) per-label structure. Cheap way to sanity-check a load or drive dashboards without running a query. Provide the implementation with |
| 11 | * `Effect.provide(AWS.NeptuneGraph.GetGraphSummaryHttp)`. |
| 12 | * ### Inspecting a Graph |
| 13 | * **Example:** Read node and edge counts |
| 14 | * ```typescript |
| 15 | * const getSummary = yield* NeptuneGraph.GetGraphSummary(graph); |
| 16 | * |
| 17 | * const summary = yield* getSummary({ mode: "BASIC" }); |
| 18 | * // summary.graphSummary?.numNodes, summary.graphSummary?.numEdges |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface GetGraphSummary extends Binding.Service< |
| 24 | GetGraphSummary, |
| 25 | "AWS.NeptuneGraph.GetGraphSummary", |
| 26 | ( |
| 27 | graph: Graph, |
| 28 | ) => Effect.Effect< |
| 29 | ( |
| 30 | request?: Omit<neptunegraph.GetGraphSummaryInput, "graphIdentifier">, |
| 31 | ) => Effect.Effect< |
| 32 | neptunegraph.GetGraphSummaryOutput, |
| 33 | neptunegraph.GetGraphSummaryError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const GetGraphSummary = Binding.Service<GetGraphSummary>( |
| 38 | "AWS.NeptuneGraph.GetGraphSummary", |
| 39 | ); |