From 0016d6d83adce75c8079fc979fe0bf0d711b6cfe Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 15 Jun 2026 14:04:53 +0200 Subject: [PATCH] Fetch chapter download status with pages mutation The pages mutation potentially changes the chapters download status, causing the cache to get outdated --- src/lib/graphql/chapter/ChapterMutation.ts | 5 +++++ src/lib/graphql/generated/graphql.ts | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib/graphql/chapter/ChapterMutation.ts b/src/lib/graphql/chapter/ChapterMutation.ts index be29a317..be7a2a7c 100644 --- a/src/lib/graphql/chapter/ChapterMutation.ts +++ b/src/lib/graphql/chapter/ChapterMutation.ts @@ -18,6 +18,11 @@ export const GET_CHAPTER_PAGES_FETCH = gql` chapter { id pageCount + isDownloaded + manga { + id + downloadCount + } } pages } diff --git a/src/lib/graphql/generated/graphql.ts b/src/lib/graphql/generated/graphql.ts index b5013e15..ec473712 100644 --- a/src/lib/graphql/generated/graphql.ts +++ b/src/lib/graphql/generated/graphql.ts @@ -519,7 +519,13 @@ export type GetChapterPagesFetchMutation = { fetchChapterPages: { __typename: 'FetchChapterPagesPayload'; pages: Array; - chapter: { __typename: 'ChapterType'; id: number; pageCount: number }; + chapter: { + __typename: 'ChapterType'; + id: number; + pageCount: number; + isDownloaded: boolean; + manga: { __typename: 'MangaType'; id: number; downloadCount: number }; + }; } | null; };