From 57b2cd3f8f2f23d40af7ec7d75b1b5a24c4796cf Mon Sep 17 00:00:00 2001 From: Sonarly Claude Code Date: Mon, 2 Mar 2026 17:40:00 +0000 Subject: [PATCH] isRecordMatchingFilter throws on stale filter referencing deleted custom field https://sonarly.com/issue/7898?type=bug When a custom field is deleted from the schema, stale Apollo cache entries still contain filters referencing that field. SSE create events trigger optimistic cache updates that walk these stale queries, causing isRecordMatchingFilter to throw because the filter key no longer maps to any field in the metadata. --- .../logic-function/dtos/logic-function.dto.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/dtos/logic-function.dto.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/dtos/logic-function.dto.ts index a8b0e2893da..73cc39b16ba 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/dtos/logic-function.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/dtos/logic-function.dto.ts @@ -64,11 +64,6 @@ export class LogicFunctionDTO { @Field() sourceHandlerPath: string; - @IsString() - @IsOptional() - @Field({ nullable: true, deprecationReason: 'Use sourceHandlerPath instead' }) - builtHandlerPath?: string; - @IsString() @Field() handlerName: string;