- 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 | id: String(row.id), | 106 | id: String(row.id), |
| 107 | workspaceId: String(row.workspace_id), | 107 | workspaceId: String(row.workspace_id), |
| 108 | name: String(row.name), | 108 | name: String(row.name), |
| 109 | type: String(row.type) as "mcp" | "openapi", | 109 | type: String(row.type) as ToolSourceRecord["type"], |
| 110 | config: parseMetadata(row.config_json), | 110 | config: parseMetadata(row.config_json), |
| 111 | enabled: Number(row.enabled) === 1, | 111 | enabled: Number(row.enabled) === 1, |
| 112 | createdAt: Number(row.created_at), | 112 | createdAt: Number(row.created_at), |
| @@ -700,7 +700,7 @@ export class ExecutorDatabase { · 587 unmodified lines | |||
| 700 | id?: string; | 700 | id?: string; |
| 701 | workspaceId: string; | 701 | workspaceId: string; |
| 702 | name: string; | 702 | name: string; |
| 703 | type: "mcp" | "openapi"; | 703 | type: ToolSourceRecord["type"]; |
| 704 | config: Record<string, unknown>; | 704 | config: Record<string, unknown>; |
| 705 | enabled?: boolean; | 705 | enabled?: boolean; |
| 706 | }): ToolSourceRecord { | 706 | }): ToolSourceRecord { |