From 2390361fb2b63fbe0726c93c4ac3a4afd04e29d2 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:15:41 +0100 Subject: [PATCH] [Codegen] Request manga download count with chapter deletion mutation (#516) After deleting a chapter, the download count of the chapters manga did not update, because the information was not requested with the mutation --- src/lib/graphql/generated/graphql.ts | 4 ++-- src/lib/graphql/mutations/DownloaderMutation.ts | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/graphql/generated/graphql.ts b/src/lib/graphql/generated/graphql.ts index 66b5afe2c7..163783c432 100644 --- a/src/lib/graphql/generated/graphql.ts +++ b/src/lib/graphql/generated/graphql.ts @@ -2292,14 +2292,14 @@ export type DeleteDownloadedChapterMutationVariables = Exact<{ }>; -export type DeleteDownloadedChapterMutation = { __typename?: 'Mutation', deleteDownloadedChapter: { __typename?: 'DeleteDownloadedChapterPayload', clientMutationId?: string | null, chapters: { __typename?: 'ChapterType', id: number, isDownloaded: boolean } } }; +export type DeleteDownloadedChapterMutation = { __typename?: 'Mutation', deleteDownloadedChapter: { __typename?: 'DeleteDownloadedChapterPayload', clientMutationId?: string | null, chapters: { __typename?: 'ChapterType', id: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, downloadCount: number } } } }; export type DeleteDownloadedChaptersMutationVariables = Exact<{ input: DeleteDownloadedChaptersInput; }>; -export type DeleteDownloadedChaptersMutation = { __typename?: 'Mutation', deleteDownloadedChapters: { __typename?: 'DeleteDownloadedChaptersPayload', clientMutationId?: string | null, chapters: Array<{ __typename?: 'ChapterType', id: number, isDownloaded: boolean }> } }; +export type DeleteDownloadedChaptersMutation = { __typename?: 'Mutation', deleteDownloadedChapters: { __typename?: 'DeleteDownloadedChaptersPayload', clientMutationId?: string | null, chapters: Array<{ __typename?: 'ChapterType', id: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, downloadCount: number } }> } }; export type DequeueChapterDownloadMutationVariables = Exact<{ input: DequeueChapterDownloadInput; diff --git a/src/lib/graphql/mutations/DownloaderMutation.ts b/src/lib/graphql/mutations/DownloaderMutation.ts index 6c343f4158..125a81d6b6 100644 --- a/src/lib/graphql/mutations/DownloaderMutation.ts +++ b/src/lib/graphql/mutations/DownloaderMutation.ts @@ -28,6 +28,10 @@ export const DELETE_DOWNLOADED_CHAPTER = gql` chapters { id isDownloaded + manga { + id + downloadCount + } } } } @@ -40,6 +44,10 @@ export const DELETE_DOWNLOADED_CHAPTERS = gql` chapters { id isDownloaded + manga { + id + downloadCount + } } } }