Files
suwayomi-material-you-webui/src/lib/graphql/fragments/UpdaterFragments.ts
T

89 lines
1.9 KiB
TypeScript
Raw Normal View History

2024-07-06 15:10:55 +02:00
/*
* 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';
const UPDATER_MANGA_FIELDS = gql`
2025-03-16 21:01:24 +01:00
fragment UPDATER_MANGA_FIELDS on MangaUpdateType {
status
manga {
id
title
thumbnailUrl
}
}
`;
const UPDATER_CATEGORY_FIELDS = gql`
fragment UPDATER_CATEGORY_FIELDS on CategoryUpdateType {
status
category {
id
name
}
}
`;
const UPDATER_JOB_INFO_FIELDS = gql`
fragment UPDATER_JOB_INFO_FIELDS on UpdaterJobsInfoType {
isRunning
totalJobs
finishedJobs
skippedCategoriesCount
skippedMangasCount
}
`;
export const UPDATER_STATUS_FIELDS = gql`
${UPDATER_JOB_INFO_FIELDS}
${UPDATER_CATEGORY_FIELDS}
${UPDATER_MANGA_FIELDS}
fragment UPDATER_STATUS_FIELDS on LibraryUpdateStatus {
jobsInfo {
...UPDATER_JOB_INFO_FIELDS
}
categoryUpdates {
...UPDATER_CATEGORY_FIELDS
}
mangaUpdates {
...UPDATER_MANGA_FIELDS
}
2024-07-06 15:10:55 +02:00
}
`;
export const UPDATER_SUBSCRIPTION_FIELDS = gql`
2025-03-16 21:01:24 +01:00
${UPDATER_JOB_INFO_FIELDS}
${UPDATER_CATEGORY_FIELDS}
2024-07-06 15:10:55 +02:00
${UPDATER_MANGA_FIELDS}
2025-03-16 21:01:24 +01:00
fragment UPDATER_SUBSCRIPTION_FIELDS on UpdaterUpdates {
omittedUpdates
2024-07-06 15:10:55 +02:00
2025-03-16 21:01:24 +01:00
jobsInfo {
...UPDATER_JOB_INFO_FIELDS
}
2025-03-16 21:01:24 +01:00
categoryUpdates {
...UPDATER_CATEGORY_FIELDS
2024-07-06 15:10:55 +02:00
}
2025-03-16 21:01:24 +01:00
mangaUpdates {
...UPDATER_MANGA_FIELDS
2024-07-06 15:10:55 +02:00
}
}
`;
export const UPDATER_START_STOP_FIELDS = gql`
fragment UPDATER_START_STOP_FIELDS on UpdateStatus {
isRunning
}
`;