Fetch chapter download status with pages mutation

The pages mutation potentially changes the chapters download status, causing the cache to get outdated
This commit is contained in:
schroda
2026-06-15 14:04:53 +02:00
parent 7153441822
commit 0016d6d83a
2 changed files with 12 additions and 1 deletions

View File

@@ -18,6 +18,11 @@ export const GET_CHAPTER_PAGES_FETCH = gql`
chapter {
id
pageCount
isDownloaded
manga {
id
downloadCount
}
}
pages
}

View File

@@ -519,7 +519,13 @@ export type GetChapterPagesFetchMutation = {
fetchChapterPages: {
__typename: 'FetchChapterPagesPayload';
pages: Array<string>;
chapter: { __typename: 'ChapterType'; id: number; pageCount: number };
chapter: {
__typename: 'ChapterType';
id: number;
pageCount: number;
isDownloaded: boolean;
manga: { __typename: 'MangaType'; id: number; downloadCount: number };
};
} | null;
};