1import type * as neptunegraph from "@distilled.cloud/aws/neptune-graph";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Graph } from "./Graph.ts";
5
6/**
7 * Runtime binding for the `GetQuery` operation (IAM action `neptune-graph:GetQueryStatus`),
8 * scoped to one {@link Graph}.
9 *
10 * Retrieves the status of a query running on the bound graph (IAM action `neptune-graph:GetQueryStatus`). Provide the implementation with
11 * `Effect.provide(AWS.NeptuneGraph.GetQueryHttp)`.
12 * ### Managing Queries
13 * **Example:** Check a running query
14 * ```typescript
15 * const getQuery = yield* NeptuneGraph.GetQuery(graph);
16 *
17 * const status = yield* getQuery({ queryId });
18 * // status.state → "RUNNING" | "WAITING" | "CANCELLING"
19 * ```
20 *
21 * @binding
22 */
23export interface GetQuery extends Binding.Service<
24 GetQuery,
25 "AWS.NeptuneGraph.GetQuery",
26 (
27 graph: Graph,
28 ) => Effect.Effect<
29 (
30 request: Omit<neptunegraph.GetQueryInput, "graphIdentifier">,
31 ) => Effect.Effect<neptunegraph.GetQueryOutput, neptunegraph.GetQueryError>
32 >
33> {}
34export const GetQuery = Binding.Service<GetQuery>("AWS.NeptuneGraph.GetQuery");