| 1 | import * as neptunegraph from "@distilled.cloud/aws/neptune-graph"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeNeptuneGraphGraphHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { ExecuteQuery } from "./ExecuteQuery.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of the {@link ExecuteQuery} binding — signs |
| 8 | * `neptune-graph:ExecuteQuery` data-plane requests against the graph's HTTPS |
| 9 | * endpoint and, at deploy time, grants the query IAM actions |
| 10 | * (`ReadDataViaQuery`, `WriteDataViaQuery`, `DeleteDataViaQuery`) on the |
| 11 | * bound graph to the host function. |
| 12 | */ |
| 13 | export const ExecuteQueryHttp = Layer.effect( |
| 14 | ExecuteQuery, |
| 15 | makeNeptuneGraphGraphHttpBinding({ |
| 16 | tag: "AWS.NeptuneGraph.ExecuteQuery", |
| 17 | operation: neptunegraph.executeQuery, |
| 18 | actions: [ |
| 19 | "neptune-graph:ReadDataViaQuery", |
| 20 | "neptune-graph:WriteDataViaQuery", |
| 21 | "neptune-graph:DeleteDataViaQuery", |
| 22 | ], |
| 23 | }), |
| 24 | ); |