Skip to content

Commit

Permalink
[backend] Fix null for objectParticipant in Task (#9752)
Browse files Browse the repository at this point in the history
Co-authored-by: BocognanoSarah <sarah.bocognano@filigran.io>
  • Loading branch information
Kedae and SarahBocognano authored Feb 3, 2025
1 parent d56583e commit 9631bf9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { Resolvers } from '../../generated/graphql';
import { findAll, findById, taskAdd, taskAddRelation, taskContainsStixObjectOrStixRelationship, taskDelete, taskDeleteRelation, taskEdit } from './task-domain';
import { loadThroughDenormalized } from '../../resolvers/stix';
import { INPUT_PARTICIPANT } from '../../schema/general';

const taskResolvers: Resolvers = {
Query: {
Expand All @@ -9,6 +11,9 @@ const taskResolvers: Resolvers = {
return taskContainsStixObjectOrStixRelationship(context, context.user, args.id, args.stixObjectOrStixRelationshipId);
},
},
Task: {
objectParticipant: (container, _, context) => loadThroughDenormalized(context, context.user, container, INPUT_PARTICIPANT, { sortBy: 'user_email' }),
},
Mutation: {
taskAdd: (_, { input }, context) => taskAdd(context, context.user, input),
taskDelete: (_, { id }, context) => taskDelete(context, context.user, id),
Expand Down

0 comments on commit 9631bf9

Please sign in to comment.