Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
QueryEngine.ts2.52 kB
import { ErrorCapturingSqlDriverAdapter } from '@prisma/driver-adapter-utils' export type EngineWasmLoadingConfig = { /** * WASM-bindgen runtime for corresponding module */ getRuntime: () => Promise<{ __wbg_set_wasm(exports: unknown): void QueryEngine: QueryEngineConstructor }> /** * Loads the raw wasm module for the wasm query engine. This configuration is * generated specifically for each type of client, eg. Node.js client and Edge * clients will have different implementations. * @remarks this is a callback on purpose, we only load the wasm if needed. * @remarks only used by LibraryEngine */ getQueryEngineWasmModule: () => Promise<unknown> } export type QueryEngineInstance = { connect(headers: string, requestId: string): Promise<void> disconnect(headers: string, requestId: string): Promise<void> /** * Frees any resources allocated by the engine's WASM instance. This method is automatically created by WASM bindgen. * Noop for other engines. */ free?(): void /** * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` * @param headersStr JSON.stringified `QueryEngineRequestHeaders` */ query(requestStr: string, headersStr: string, transactionId: string | undefined, requestId: string): Promise<string> sdlSchema?(): Promise<string> // TODO: remove it from the library engine entirely startTransaction(options: string, traceHeaders: string, requestId: string): Promise<string> commitTransaction(id: string, traceHeaders: string, requestId: string): Promise<string> rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise<string> metrics?(options: string): Promise<string> applyPendingMigrations?(): Promise<void> trace(requestId: string): Promise<string | null> } export interface QueryEngineConstructor { new ( config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingSqlDriverAdapter, ): QueryEngineInstance } export type QueryEngineConfig = { // TODO rename datamodel here and other places datamodel: string configDir: string logQueries: boolean ignoreEnvVarErrors: boolean datasourceOverrides: Record<string, string> env: Record<string, string | undefined> logLevel: QueryEngineLogLevel engineProtocol: QueryEngineProtocol enableTracing: boolean } export type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off' export type QueryEngineProtocol = 'graphql' | 'json'

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prisma/prisma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server