Skip to content

Commit 79e0858

Browse files
committed
Fix GraphQL mutation to exclude unsupported templateId field
- Remove templateId and copyFromGraphId from GraphQL mutation input - Prevents 'templateId is not defined by type GraphCreateInput' error - Allows graph creation to work with current Neo4j schema
1 parent 679e301 commit 79e0858

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/web/src/contexts/GraphContext.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@ export function GraphProvider({ children }: GraphProviderProps) {
144144

145145
try {
146146
// Pass exactly what the UI sends - let GraphQL handle it
147+
// Exclude templateId and copyFromGraphId as they're not supported by the current schema
148+
const { templateId, copyFromGraphId, ...inputWithoutTemplate } = input;
147149
const graphInput = {
148-
...input, // This includes: name, description, type, status, teamId, tags, defaultRole, isShared
150+
...inputWithoutTemplate, // This includes: name, description, type, status, teamId, tags, defaultRole, isShared
149151
parentGraphId: input.parentGraphId || null,
150152
createdBy: input.createdBy || currentUser?.id || '',
151153
depth: input.parentGraphId ? getGraphDepth(input.parentGraphId) + 1 : 0,

0 commit comments

Comments
 (0)