Skip to content

Commit 9631bf9

Browse files
[backend] Fix null for objectParticipant in Task (#9752)
Co-authored-by: BocognanoSarah <[email protected]>
1 parent d56583e commit 9631bf9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

opencti-platform/opencti-graphql/src/modules/task/task-resolvers.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { Resolvers } from '../../generated/graphql';
22
import { findAll, findById, taskAdd, taskAddRelation, taskContainsStixObjectOrStixRelationship, taskDelete, taskDeleteRelation, taskEdit } from './task-domain';
3+
import { loadThroughDenormalized } from '../../resolvers/stix';
4+
import { INPUT_PARTICIPANT } from '../../schema/general';
35

46
const taskResolvers: Resolvers = {
57
Query: {
@@ -9,6 +11,9 @@ const taskResolvers: Resolvers = {
911
return taskContainsStixObjectOrStixRelationship(context, context.user, args.id, args.stixObjectOrStixRelationshipId);
1012
},
1113
},
14+
Task: {
15+
objectParticipant: (container, _, context) => loadThroughDenormalized(context, context.user, container, INPUT_PARTICIPANT, { sortBy: 'user_email' }),
16+
},
1217
Mutation: {
1318
taskAdd: (_, { input }, context) => taskAdd(context, context.user, input),
1419
taskDelete: (_, { id }, context) => taskDelete(context, context.user, id),

0 commit comments

Comments
 (0)