[Codegen] Update manga chapter total count on initial refresh (#582)
In case a manga hadn't been initialized yet, its chapter total count was still 0 after refreshing the manga and its chapter list data. This was caused because its chapter list hadn't been fetched yet by the time the manga refresh mutation resolved.
This commit is contained in:
@@ -2594,7 +2594,7 @@ export type GetMangaChaptersFetchMutationVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type GetMangaChaptersFetchMutation = { __typename?: 'Mutation', fetchChapters: { __typename?: 'FetchChaptersPayload', clientMutationId?: string | null, chapters: Array<{ __typename?: 'ChapterType', chapterNumber: number, fetchedAt: any, id: number, isBookmarked: boolean, isDownloaded: boolean, isRead: boolean, lastPageRead: number, lastReadAt: any, name: string, pageCount: number, realUrl?: string | null, scanlator?: string | null, sourceOrder: number, uploadDate: any, url: string, manga: { __typename?: 'MangaType', id: number, title: string, inLibrary: boolean, thumbnailUrl?: string | null }, meta: Array<{ __typename?: 'ChapterMetaType', key: string, value: string }> }> } };
|
||||
export type GetMangaChaptersFetchMutation = { __typename?: 'Mutation', fetchChapters: { __typename?: 'FetchChaptersPayload', clientMutationId?: string | null, chapters: Array<{ __typename?: 'ChapterType', chapterNumber: number, fetchedAt: any, id: number, isBookmarked: boolean, isDownloaded: boolean, isRead: boolean, lastPageRead: number, lastReadAt: any, name: string, pageCount: number, realUrl?: string | null, scanlator?: string | null, sourceOrder: number, uploadDate: any, url: string, manga: { __typename?: 'MangaType', id: number, title: string, inLibrary: boolean, thumbnailUrl?: string | null, chapters: { __typename?: 'ChapterNodeList', totalCount: number } }, meta: Array<{ __typename?: 'ChapterMetaType', key: string, value: string }> }> } };
|
||||
|
||||
export type SetChapterMetadataMutationVariables = Exact<{
|
||||
input: SetChapterMetaInput;
|
||||
|
||||
@@ -57,6 +57,12 @@ export const GET_MANGA_CHAPTERS_FETCH = gql`
|
||||
clientMutationId
|
||||
chapters {
|
||||
...FULL_CHAPTER_FIELDS
|
||||
manga {
|
||||
id
|
||||
chapters {
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user