Skip to content

Commit 809537a

Browse files
committed
Add projectId filter to engagement filter block
It is repeated twice now in the current query which already matches the project, but another entry point could not have applied that filter. I don't think it is double the work for the DB.
1 parent ebb4418 commit 809537a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/engagement/engagement.repository.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,11 @@ export const engagementFilters = filter.define(() => EngagementFilters, {
521521
})!,
522522
),
523523
}),
524-
projectId: filter.skip,
524+
projectId: filter.pathExists((id) => [
525+
node('node'),
526+
relation('in', '', 'engagement'),
527+
node('project', 'Project', { id }),
528+
]),
525529
partnerId: filter.pathExists((id) => [
526530
node('node'),
527531
relation('in', '', 'engagement'),

0 commit comments

Comments
 (0)