- Updated ToolSourceRecord and related interfaces to include "graphql" as a valid type. - Modified database mapping and service logic to accommodate GraphQL tool sources. - Enhanced API and UI components to support GraphQL endpoint configuration and validation. - Implemented GraphQL-specific logic for tool approval decisions and introspection handling.
Showing the changes to executor/apps/server/src/database.ts (1 of 9 files). Show all
Unified · Split
| @@ -106,7 +106,7 @@ function mapToolSourceRow(row: Record<string, unknown>): ToolSourceRecord { · 105 unmodified lines | ||
| 106 | 106 | id: String(row.id), |
| 107 | 107 | workspaceId: String(row.workspace_id), |
| 108 | 108 | name: String(row.name), |
| 109 | − type: String(row.type) as "mcp" | "openapi", | |
| 109 | + type: String(row.type) as ToolSourceRecord["type"], | |
| 110 | 110 | config: parseMetadata(row.config_json), |
| 111 | 111 | enabled: Number(row.enabled) === 1, |
| 112 | 112 | createdAt: Number(row.created_at), |
| @@ -700,7 +700,7 @@ export class ExecutorDatabase { · 587 unmodified lines | ||
| 700 | 700 | id?: string; |
| 701 | 701 | workspaceId: string; |
| 702 | 702 | name: string; |
| 703 | − type: "mcp" | "openapi"; | |
| 703 | + type: ToolSourceRecord["type"]; | |
| 704 | 704 | config: Record<string, unknown>; |
| 705 | 705 | enabled?: boolean; |
| 706 | 706 | }): ToolSourceRecord { |