diff --git a/src/lib/graphql/Fragments.ts b/src/lib/graphql/Fragments.ts index fa804526..5c2e037e 100644 --- a/src/lib/graphql/Fragments.ts +++ b/src/lib/graphql/Fragments.ts @@ -185,28 +185,6 @@ export const FULL_EXTENSION_FIELDS = gql` } `; -export const FULL_DOWNLOAD_STATUS = gql` - fragment FULL_DOWNLOAD_STATUS on DownloadStatus { - queue { - chapter { - id - name - sourceOrder - isDownloaded - manga { - id - title - downloadCount - } - } - progress - state - tries - } - state - } -`; - export const ABOUT_WEBUI = gql` fragment ABOUT_WEBUI on AboutWebUI { channel diff --git a/src/lib/graphql/fragments/DownloadFragments.ts b/src/lib/graphql/fragments/DownloadFragments.ts new file mode 100644 index 00000000..f1570d5e --- /dev/null +++ b/src/lib/graphql/fragments/DownloadFragments.ts @@ -0,0 +1,34 @@ +/* + * Copyright (C) Contributors to the Suwayomi project + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + +import gql from 'graphql-tag'; + +export const DOWNLOAD_STATUS_FIELDS = gql` + fragment DOWNLOAD_STATUS_FIELDS on DownloadStatus { + state + + queue { + chapter { + id + name + sourceOrder + isDownloaded + } + + manga { + id + title + downloadCount + } + + progress + state + tries + } + } +`; diff --git a/src/lib/graphql/generated/graphql.ts b/src/lib/graphql/generated/graphql.ts index 8bda1835..aae24933 100644 --- a/src/lib/graphql/generated/graphql.ts +++ b/src/lib/graphql/generated/graphql.ts @@ -2602,11 +2602,8 @@ export type FullChapterFieldsFragment = { __typename?: 'ChapterType', chapterNum export type FullMangaFieldsFragment = { __typename?: 'MangaType', unreadCount: number, downloadCount: number, bookmarkCount: number, artist?: string | null, author?: string | null, chaptersLastFetchedAt?: string | null, description?: string | null, genre: Array, id: number, inLibrary: boolean, inLibraryAt: string, initialized: boolean, lastFetchedAt?: string | null, realUrl?: string | null, status: MangaStatus, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, title: string, url: string, lastReadChapter?: { __typename?: 'ChapterType', chapterNumber: number, fetchedAt: string, id: number, isBookmarked: boolean, isDownloaded: boolean, isRead: boolean, lastPageRead: number, lastReadAt: string, mangaId: number, name: string, pageCount: number, realUrl?: string | null, scanlator?: string | null, sourceOrder: number, uploadDate: string, url: string, manga: { __typename?: 'MangaType', id: number, title: string, inLibrary: boolean, thumbnailUrl?: string | null, lastFetchedAt?: string | null }, meta: Array<{ __typename?: 'ChapterMetaType', key: string, value: string }> } | null, latestReadChapter?: { __typename?: 'ChapterType', chapterNumber: number, fetchedAt: string, id: number, isBookmarked: boolean, isDownloaded: boolean, isRead: boolean, lastPageRead: number, lastReadAt: string, mangaId: number, name: string, pageCount: number, realUrl?: string | null, scanlator?: string | null, sourceOrder: number, uploadDate: string, url: string, manga: { __typename?: 'MangaType', id: number, title: string, inLibrary: boolean, thumbnailUrl?: string | null, lastFetchedAt?: string | null }, meta: Array<{ __typename?: 'ChapterMetaType', key: string, value: string }> } | null, latestFetchedChapter?: { __typename?: 'ChapterType', chapterNumber: number, fetchedAt: string, id: number, isBookmarked: boolean, isDownloaded: boolean, isRead: boolean, lastPageRead: number, lastReadAt: string, mangaId: number, name: string, pageCount: number, realUrl?: string | null, scanlator?: string | null, sourceOrder: number, uploadDate: string, url: string, manga: { __typename?: 'MangaType', id: number, title: string, inLibrary: boolean, thumbnailUrl?: string | null, lastFetchedAt?: string | null }, meta: Array<{ __typename?: 'ChapterMetaType', key: string, value: string }> } | null, latestUploadedChapter?: { __typename?: 'ChapterType', chapterNumber: number, fetchedAt: string, id: number, isBookmarked: boolean, isDownloaded: boolean, isRead: boolean, lastPageRead: number, lastReadAt: string, mangaId: number, name: string, pageCount: number, realUrl?: string | null, scanlator?: string | null, sourceOrder: number, uploadDate: string, url: string, manga: { __typename?: 'MangaType', id: number, title: string, inLibrary: boolean, thumbnailUrl?: string | null, lastFetchedAt?: string | null }, meta: Array<{ __typename?: 'ChapterMetaType', key: string, value: string }> } | null, firstUnreadChapter?: { __typename?: 'ChapterType', chapterNumber: number, fetchedAt: string, id: number, isBookmarked: boolean, isDownloaded: boolean, isRead: boolean, lastPageRead: number, lastReadAt: string, mangaId: number, name: string, pageCount: number, realUrl?: string | null, scanlator?: string | null, sourceOrder: number, uploadDate: string, url: string, manga: { __typename?: 'MangaType', id: number, title: string, inLibrary: boolean, thumbnailUrl?: string | null, lastFetchedAt?: string | null }, meta: Array<{ __typename?: 'ChapterMetaType', key: string, value: string }> } | null, categories: { __typename?: 'CategoryNodeList', totalCount: number, nodes: Array<{ __typename?: 'CategoryType', default: boolean, id: number, includeInUpdate: IncludeOrExclude, includeInDownload: IncludeOrExclude, name: string, order: number, meta: Array<{ __typename?: 'CategoryMetaType', key: string, value: string }>, mangas: { __typename?: 'MangaNodeList', totalCount: number } }> }, chapters: { __typename?: 'ChapterNodeList', totalCount: number }, meta: Array<{ __typename?: 'MangaMetaType', key: string, value: string }>, source?: { __typename?: 'SourceType', id: string, name: string, displayName: string } | null, trackRecords: { __typename?: 'TrackRecordNodeList', totalCount: number, nodes: Array<{ __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number, remoteUrl: string, title: string, status: number, lastChapterRead: number, totalChapters: number, score: number, displayScore: string, startDate: string, finishDate: string, tracker: { __typename?: 'TrackerType', icon: string, supportsTrackDeletion?: boolean | null, scores: Array, id: number, name: string, isLoggedIn: boolean, isTokenExpired: boolean, statuses: Array<{ __typename?: 'TrackStatusType', name: string, value: number }>, trackRecords: { __typename?: 'TrackRecordNodeList', nodes: Array<{ __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number, remoteUrl: string, title: string, status: number, lastChapterRead: number, totalChapters: number, score: number, displayScore: string, startDate: string, finishDate: string }> } } }> } }; - export type FullExtensionFieldsFragment = { __typename?: 'ExtensionType', apkName: string, repo?: string | null, hasUpdate: boolean, iconUrl: string, isInstalled: boolean, isNsfw: boolean, isObsolete: boolean, lang: string, name: string, pkgName: string, versionCode: number, versionName: string }; -export type FullDownloadStatusFragment = { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } } }> }; - export type AboutWebuiFragment = { __typename?: 'AboutWebUI', channel: string, tag: string }; export type WebuiUpdateCheckFragment = { __typename?: 'WebUIUpdateCheck', channel: string, tag: string, updateAvailable: boolean }; @@ -2635,6 +2632,8 @@ export type ChapterListFieldsFragment = { __typename?: 'ChapterType', fetchedAt: export type ChapterUpdateListFieldsFragment = { __typename?: 'ChapterType', fetchedAt: string, uploadDate: string, id: number, name: string, mangaId: number, scanlator?: string | null, realUrl?: string | null, sourceOrder: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean } }; +export type DownloadStatusFieldsFragment = { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }> }; + export type SourceBaseFieldsFragment = { __typename?: 'SourceType', id: string, name: string, displayName: string }; export type SourceMigratableFieldsFragment = { __typename?: 'SourceType', lang: string, iconUrl: string, id: string, name: string, displayName: string }; @@ -2793,7 +2792,7 @@ export type ClearDownloaderMutationVariables = Exact<{ }>; -export type ClearDownloaderMutation = { __typename?: 'Mutation', clearDownloader?: { __typename?: 'ClearDownloaderPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } } }> } } | null }; +export type ClearDownloaderMutation = { __typename?: 'Mutation', clearDownloader?: { __typename?: 'ClearDownloaderPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }> } } | null }; export type DeleteDownloadedChapterMutationVariables = Exact<{ input: DeleteDownloadedChapterInput; @@ -2814,35 +2813,35 @@ export type DequeueChapterDownloadMutationVariables = Exact<{ }>; -export type DequeueChapterDownloadMutation = { __typename?: 'Mutation', dequeueChapterDownload?: { __typename?: 'DequeueChapterDownloadPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } } }> } } | null }; +export type DequeueChapterDownloadMutation = { __typename?: 'Mutation', dequeueChapterDownload?: { __typename?: 'DequeueChapterDownloadPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }> } } | null }; export type DequeueChapterDownloadsMutationVariables = Exact<{ input: DequeueChapterDownloadsInput; }>; -export type DequeueChapterDownloadsMutation = { __typename?: 'Mutation', dequeueChapterDownloads?: { __typename?: 'DequeueChapterDownloadsPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } } }> } } | null }; +export type DequeueChapterDownloadsMutation = { __typename?: 'Mutation', dequeueChapterDownloads?: { __typename?: 'DequeueChapterDownloadsPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }> } } | null }; export type EnqueueChapterDownloadMutationVariables = Exact<{ input: EnqueueChapterDownloadInput; }>; -export type EnqueueChapterDownloadMutation = { __typename?: 'Mutation', enqueueChapterDownload?: { __typename?: 'EnqueueChapterDownloadPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } } }> } } | null }; +export type EnqueueChapterDownloadMutation = { __typename?: 'Mutation', enqueueChapterDownload?: { __typename?: 'EnqueueChapterDownloadPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }> } } | null }; export type EnqueueChapterDownloadsMutationVariables = Exact<{ input: EnqueueChapterDownloadsInput; }>; -export type EnqueueChapterDownloadsMutation = { __typename?: 'Mutation', enqueueChapterDownloads?: { __typename?: 'EnqueueChapterDownloadsPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } } }> } } | null }; +export type EnqueueChapterDownloadsMutation = { __typename?: 'Mutation', enqueueChapterDownloads?: { __typename?: 'EnqueueChapterDownloadsPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }> } } | null }; export type ReorderChapterDownloadMutationVariables = Exact<{ input: ReorderChapterDownloadInput; }>; -export type ReorderChapterDownloadMutation = { __typename?: 'Mutation', reorderChapterDownload?: { __typename?: 'ReorderChapterDownloadPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } } }> } } | null }; +export type ReorderChapterDownloadMutation = { __typename?: 'Mutation', reorderChapterDownload?: { __typename?: 'ReorderChapterDownloadPayload', clientMutationId?: string | null, downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }> } } | null }; export type StartDownloaderMutationVariables = Exact<{ input?: InputMaybe; @@ -3213,7 +3212,7 @@ export type GetMangasChapterIdsWithStateQuery = { __typename?: 'Query', chapters export type GetDownloadStatusQueryVariables = Exact<{ [key: string]: never; }>; -export type GetDownloadStatusQuery = { __typename?: 'Query', downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } } }> } }; +export type GetDownloadStatusQuery = { __typename?: 'Query', downloadStatus: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }> } }; export type GetExtensionQueryVariables = Exact<{ pkgName: Scalars['String']['input']; @@ -3385,7 +3384,7 @@ export type GetLastUpdateTimestampQuery = { __typename?: 'Query', lastUpdateTime export type DownloadStatusSubscriptionVariables = Exact<{ [key: string]: never; }>; -export type DownloadStatusSubscription = { __typename?: 'Subscription', downloadChanged: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } } }> } }; +export type DownloadStatusSubscription = { __typename?: 'Subscription', downloadChanged: { __typename?: 'DownloadStatus', state: DownloaderState, queue: Array<{ __typename?: 'DownloadType', progress: number, state: DownloadState, tries: number, chapter: { __typename?: 'ChapterType', id: number, name: string, sourceOrder: number, isDownloaded: boolean }, manga: { __typename?: 'MangaType', id: number, title: string, downloadCount: number } }> } }; export type WebuiUpdateSubscriptionVariables = Exact<{ [key: string]: never; }>; diff --git a/src/lib/graphql/mutations/DownloaderMutation.ts b/src/lib/graphql/mutations/DownloaderMutation.ts index 0c4a8cf8..e7190e64 100644 --- a/src/lib/graphql/mutations/DownloaderMutation.ts +++ b/src/lib/graphql/mutations/DownloaderMutation.ts @@ -7,15 +7,16 @@ */ import gql from 'graphql-tag'; -import { FULL_DOWNLOAD_STATUS } from '@/lib/graphql/Fragments'; +import { DOWNLOAD_STATUS_FIELDS } from '@/lib/graphql/fragments/DownloadFragments.ts'; export const CLEAR_DOWNLOADER = gql` - ${FULL_DOWNLOAD_STATUS} + ${DOWNLOAD_STATUS_FIELDS} + mutation CLEAR_DOWNLOADER($input: ClearDownloaderInput = {}) { clearDownloader(input: $input) { clientMutationId downloadStatus { - ...FULL_DOWNLOAD_STATUS + ...DOWNLOAD_STATUS_FIELDS } } } @@ -54,60 +55,65 @@ export const DELETE_DOWNLOADED_CHAPTERS = gql` `; export const DEQUEUE_CHAPTER_DOWNLOAD = gql` - ${FULL_DOWNLOAD_STATUS} + ${DOWNLOAD_STATUS_FIELDS} + mutation DEQUEUE_CHAPTER_DOWNLOAD($input: DequeueChapterDownloadInput!) { dequeueChapterDownload(input: $input) { clientMutationId downloadStatus { - ...FULL_DOWNLOAD_STATUS + ...DOWNLOAD_STATUS_FIELDS } } } `; export const DEQUEUE_CHAPTER_DOWNLOADS = gql` - ${FULL_DOWNLOAD_STATUS} + ${DOWNLOAD_STATUS_FIELDS} + mutation DEQUEUE_CHAPTER_DOWNLOADS($input: DequeueChapterDownloadsInput!) { dequeueChapterDownloads(input: $input) { clientMutationId downloadStatus { - ...FULL_DOWNLOAD_STATUS + ...DOWNLOAD_STATUS_FIELDS } } } `; export const ENQUEUE_CHAPTER_DOWNLOAD = gql` - ${FULL_DOWNLOAD_STATUS} + ${DOWNLOAD_STATUS_FIELDS} + mutation ENQUEUE_CHAPTER_DOWNLOAD($input: EnqueueChapterDownloadInput!) { enqueueChapterDownload(input: $input) { clientMutationId downloadStatus { - ...FULL_DOWNLOAD_STATUS + ...DOWNLOAD_STATUS_FIELDS } } } `; export const ENQUEUE_CHAPTER_DOWNLOADS = gql` - ${FULL_DOWNLOAD_STATUS} + ${DOWNLOAD_STATUS_FIELDS} + mutation ENQUEUE_CHAPTER_DOWNLOADS($input: EnqueueChapterDownloadsInput!) { enqueueChapterDownloads(input: $input) { clientMutationId downloadStatus { - ...FULL_DOWNLOAD_STATUS + ...DOWNLOAD_STATUS_FIELDS } } } `; export const REORDER_CHAPTER_DOWNLOAD = gql` - ${FULL_DOWNLOAD_STATUS} + ${DOWNLOAD_STATUS_FIELDS} + mutation REORDER_CHAPTER_DOWNLOAD($input: ReorderChapterDownloadInput!) { reorderChapterDownload(input: $input) { clientMutationId downloadStatus { - ...FULL_DOWNLOAD_STATUS + ...DOWNLOAD_STATUS_FIELDS } } } diff --git a/src/lib/graphql/queries/DownloaderQuery.ts b/src/lib/graphql/queries/DownloaderQuery.ts index bab33fac..b7e30e1e 100644 --- a/src/lib/graphql/queries/DownloaderQuery.ts +++ b/src/lib/graphql/queries/DownloaderQuery.ts @@ -7,13 +7,14 @@ */ import gql from 'graphql-tag'; -import { FULL_DOWNLOAD_STATUS } from '@/lib/graphql/Fragments'; +import { DOWNLOAD_STATUS_FIELDS } from '@/lib/graphql/fragments/DownloadFragments.ts'; export const GET_DOWNLOAD_STATUS = gql` - ${FULL_DOWNLOAD_STATUS} + ${DOWNLOAD_STATUS_FIELDS} + query GET_DOWNLOAD_STATUS { downloadStatus { - ...FULL_DOWNLOAD_STATUS + ...DOWNLOAD_STATUS_FIELDS } } `; diff --git a/src/lib/graphql/subscriptions/DownloaderSubscription.ts b/src/lib/graphql/subscriptions/DownloaderSubscription.ts index c70d4915..2d2af0cc 100644 --- a/src/lib/graphql/subscriptions/DownloaderSubscription.ts +++ b/src/lib/graphql/subscriptions/DownloaderSubscription.ts @@ -7,13 +7,14 @@ */ import gql from 'graphql-tag'; -import { FULL_DOWNLOAD_STATUS } from '@/lib/graphql/Fragments'; +import { DOWNLOAD_STATUS_FIELDS } from '@/lib/graphql/fragments/DownloadFragments.ts'; export const DOWNLOAD_STATUS_SUBSCRIPTION = gql` - ${FULL_DOWNLOAD_STATUS} + ${DOWNLOAD_STATUS_FIELDS} + subscription DOWNLOAD_STATUS_SUBSCRIPTION { downloadChanged { - ...FULL_DOWNLOAD_STATUS + ...DOWNLOAD_STATUS_FIELDS } } `; diff --git a/src/lib/requests/RequestManager.ts b/src/lib/requests/RequestManager.ts index 4b37b71c..c5fb6dd1 100644 --- a/src/lib/requests/RequestManager.ts +++ b/src/lib/requests/RequestManager.ts @@ -283,12 +283,7 @@ import { DOWNLOAD_STATUS_SUBSCRIPTION } from '@/lib/graphql/subscriptions/Downlo import { UPDATER_SUBSCRIPTION } from '@/lib/graphql/subscriptions/UpdaterSubscription.ts'; import { GET_SERVER_SETTINGS } from '@/lib/graphql/queries/SettingsQuery.ts'; import { UPDATE_SERVER_SETTINGS } from '@/lib/graphql/mutations/SettingsMutation.ts'; -import { - BASE_MANGA_FIELDS, - FULL_DOWNLOAD_STATUS, - FULL_EXTENSION_FIELDS, - GLOBAL_METADATA, -} from '@/lib/graphql/Fragments.ts'; +import { BASE_MANGA_FIELDS, FULL_EXTENSION_FIELDS, GLOBAL_METADATA } from '@/lib/graphql/Fragments.ts'; import { CLEAR_SERVER_CACHE } from '@/lib/graphql/mutations/ImageMutation.ts'; import { RESET_WEBUI_UPDATE_STATUS, UPDATE_WEBUI } from '@/lib/graphql/mutations/ServerInfoMutation.ts'; import { WEBUI_UPDATE_SUBSCRIPTION } from '@/lib/graphql/subscriptions/ServerInfoSubscription.ts'; @@ -307,6 +302,7 @@ import { } from '@/lib/graphql/mutations/TrackerMutation.ts'; import { ControlledPromise } from '@/lib/ControlledPromise.ts'; import { MetadataMigrationSettings, TManga } from '@/typings.ts'; +import { DOWNLOAD_STATUS_FIELDS } from '@/lib/graphql/fragments/DownloadFragments.ts'; enum GQLMethod { QUERY = 'QUERY', @@ -2334,7 +2330,7 @@ export class RequestManager { DownloadStatusSubscription['downloadChanged'] >({ id: 'DownloadStatus:{}', - fragment: FULL_DOWNLOAD_STATUS, + fragment: DOWNLOAD_STATUS_FIELDS, }); if (!variables) {