Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backend] Fix null for objectParticipant in Task (#9752) #9755

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[backend] Fix null for objectParticipant in Task
Kedae committed Jan 29, 2025

Verified

This commit was signed with the committer’s verified signature.
Kedae Adrien Servel
commit 3da6ef75284ef5e3213de47eb62ef87779b09593
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: {
@@ -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),
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ type Task implements Container & StixDomainObject & StixCoreObject & StixObject
modified: DateTime
x_opencti_graph_data: String
objectAssignee: [Assignee!]
objectParticipant: [Participant!]
objectParticipant: [Participant!]!
avatar: OpenCtiFile
# Container
authorized_members: [MemberAccess!]