| 1 | import type * as firebasedataconnect from "@distilled.cloud/gcp/firebasedataconnect_v1"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuntimeContext } from "../../RuntimeContext.ts"; |
| 5 | import type { Service } from "./Service.ts"; |
| 6 | |
| 7 | export interface ExecuteGraphqlReadRequest extends Omit< |
| 8 | firebasedataconnect.ExecuteGraphqlReadProjectsLocationsServicesRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Data Connect `services.executeGraphqlRead`. |
| 14 | * |
| 15 | * Same as {@link ExecuteGraphql} but rejects mutations. Provide |
| 16 | * {@link ExecuteGraphqlReadHttp}. |
| 17 | * |
| 18 | * ### Reading GraphQL |
| 19 | * **Example:** Read-only query |
| 20 | * ```typescript |
| 21 | * const executeGraphqlRead = |
| 22 | * yield* GCP.FirebaseDataConnect.ExecuteGraphqlRead(service); |
| 23 | * const result = yield* executeGraphqlRead({ |
| 24 | * body: { query: "{ __typename }" }, |
| 25 | * }); |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | * @category FirebaseDataConnect |
| 30 | */ |
| 31 | export interface ExecuteGraphqlRead extends Binding.Service< |
| 32 | ExecuteGraphqlRead, |
| 33 | "GCP.FirebaseDataConnect.ExecuteGraphqlRead", |
| 34 | ( |
| 35 | service: Service, |
| 36 | ) => Effect.Effect< |
| 37 | ( |
| 38 | request: ExecuteGraphqlReadRequest, |
| 39 | ) => Effect.Effect< |
| 40 | firebasedataconnect.GraphqlResponse, |
| 41 | firebasedataconnect.ExecuteGraphqlReadProjectsLocationsServicesError, |
| 42 | RuntimeContext |
| 43 | > |
| 44 | > |
| 45 | > {} |
| 46 | |
| 47 | export const ExecuteGraphqlRead = Binding.Service<ExecuteGraphqlRead>( |
| 48 | "GCP.FirebaseDataConnect.ExecuteGraphqlRead", |
| 49 | ); |