fix: graphSchema missing ON_SUCCESS edge type + label field

- Add all valid EdgeTypes to graphSchema.edges.type enum
- Add label field to graphSchema.nodes (graph-builder passes it)
- Was causing 圖定義產生失敗 for all /cypher/execute calls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 16:07:51 +08:00
parent 2594f8371d
commit 65769fc0dd
+2 -1
View File
@@ -8,12 +8,13 @@ export const graphSchema = z.object({
id: z.string(), id: z.string(),
type: z.enum(['Input', 'Component', 'Output']), type: z.enum(['Input', 'Component', 'Output']),
componentId: z.string().optional(), componentId: z.string().optional(),
label: z.string().optional(),
data: z.record(z.unknown()).optional(), data: z.record(z.unknown()).optional(),
})), })),
edges: z.array(z.object({ edges: z.array(z.object({
from: z.string(), from: z.string(),
to: z.string(), to: z.string(),
type: z.enum(['PIPE', 'IF', 'FOREACH', 'CONTINUE']), type: z.enum(['PIPE', 'IF', 'FOREACH', 'CONTINUE', 'IS_A', 'ON_SUCCESS', 'ON_FAIL', 'ON_CLICK', 'CALLS_SUBFLOW', 'CONTAINS', 'HAS_STYLE', 'HAS_BEHAVIOR']),
condition: z.string().optional(), condition: z.string().optional(),
iterator: z.string().optional(), iterator: z.string().optional(),
})), })),