From f85abf5d46abcf664415fbb4218b0494e3d7391d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Sat, 8 Jul 2023 17:21:11 +0200 Subject: [PATCH] Fix save behavior --- front/src/generated/graphql.tsx | 10 ++++++---- .../components/RightDrawerCreateCommentThread.tsx | 11 ++++++----- front/src/modules/comments/services/create.ts | 6 ++++-- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/front/src/generated/graphql.tsx b/front/src/generated/graphql.tsx index 0b47e3bf336..18e0a5df6b3 100644 --- a/front/src/generated/graphql.tsx +++ b/front/src/generated/graphql.tsx @@ -3033,7 +3033,8 @@ export type CreateCommentMutation = { __typename?: 'Mutation', createOneComment: export type CreateCommentThreadWithCommentMutationVariables = Exact<{ commentThreadId: Scalars['String']; - commentText: Scalars['String']; + body?: InputMaybe; + title?: InputMaybe; authorId: Scalars['String']; createdAt: Scalars['DateTime']; commentThreadTargetArray: Array | CommentThreadTargetCreateManyCommentThreadInput; @@ -3576,9 +3577,9 @@ export type CreateCommentMutationHookResult = ReturnType; export type CreateCommentMutationOptions = Apollo.BaseMutationOptions; export const CreateCommentThreadWithCommentDocument = gql` - mutation CreateCommentThreadWithComment($commentThreadId: String!, $commentText: String!, $authorId: String!, $createdAt: DateTime!, $commentThreadTargetArray: [CommentThreadTargetCreateManyCommentThreadInput!]!) { + mutation CreateCommentThreadWithComment($commentThreadId: String!, $body: String, $title: String, $authorId: String!, $createdAt: DateTime!, $commentThreadTargetArray: [CommentThreadTargetCreateManyCommentThreadInput!]!) { createOneCommentThread( - data: {id: $commentThreadId, createdAt: $createdAt, updatedAt: $createdAt, author: {connect: {id: $authorId}}, body: $commentText, commentThreadTargets: {createMany: {data: $commentThreadTargetArray, skipDuplicates: true}}} + data: {id: $commentThreadId, createdAt: $createdAt, updatedAt: $createdAt, author: {connect: {id: $authorId}}, body: $body, title: $title, commentThreadTargets: {createMany: {data: $commentThreadTargetArray, skipDuplicates: true}}} ) { id createdAt @@ -3620,7 +3621,8 @@ export type CreateCommentThreadWithCommentMutationFn = Apollo.MutationFunction