Skip to content

Commit 90b551e

Browse files
authored
Fix Project.engagements() with input.filter.project usage (#3496)
New ECMA class fields have all properties defined as undefined. Keys are not optional. So ```ts { id: project.id, ...{ id: undefined }, } ``` So undefined overrides our id instead of us forcing it. This caused queries like ```graphql query { project(id: "") { engagements(input: { filter: { project: {} } }) { total items { id } } } } ``` to return more engagements than the one for the project
1 parent 12a182f commit 90b551e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/project/project.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ export class ProjectService {
355355
filter: {
356356
...input.filter,
357357
project: {
358-
id: project.id,
359358
...input.filter?.project,
359+
id: project.id,
360360
},
361361
},
362362
},
@@ -383,8 +383,8 @@ export class ProjectService {
383383
filter: {
384384
...input.filter,
385385
project: {
386-
id: project.id,
387386
...input.filter?.project,
387+
id: project.id,
388388
},
389389
},
390390
});

0 commit comments

Comments
 (0)