Extract info gql fragments
This commit is contained in:
@@ -23,36 +23,3 @@ export const GLOBAL_METADATA = gql`
|
||||
value
|
||||
}
|
||||
`;
|
||||
|
||||
export const ABOUT_WEBUI = gql`
|
||||
fragment ABOUT_WEBUI on AboutWebUI {
|
||||
channel
|
||||
tag
|
||||
}
|
||||
`;
|
||||
|
||||
export const WEBUI_UPDATE_CHECK = gql`
|
||||
fragment WEBUI_UPDATE_CHECK on WebUIUpdateCheck {
|
||||
channel
|
||||
tag
|
||||
updateAvailable
|
||||
}
|
||||
`;
|
||||
|
||||
export const WEBUI_UPDATE_INFO = gql`
|
||||
fragment WEBUI_UPDATE_INFO on WebUIUpdateInfo {
|
||||
channel
|
||||
tag
|
||||
}
|
||||
`;
|
||||
|
||||
export const WEBUI_UPDATE_STATUS = gql`
|
||||
${WEBUI_UPDATE_INFO}
|
||||
fragment WEBUI_UPDATE_STATUS on WebUIUpdateStatus {
|
||||
info {
|
||||
...WEBUI_UPDATE_INFO
|
||||
}
|
||||
progress
|
||||
state
|
||||
}
|
||||
`;
|
||||
|
||||
42
src/lib/graphql/fragments/InfoFragments.ts
Normal file
42
src/lib/graphql/fragments/InfoFragments.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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 ABOUT_WEBUI = gql`
|
||||
fragment ABOUT_WEBUI on AboutWebUI {
|
||||
channel
|
||||
tag
|
||||
}
|
||||
`;
|
||||
|
||||
export const WEBUI_UPDATE_CHECK = gql`
|
||||
fragment WEBUI_UPDATE_CHECK on WebUIUpdateCheck {
|
||||
channel
|
||||
tag
|
||||
updateAvailable
|
||||
}
|
||||
`;
|
||||
|
||||
export const WEBUI_UPDATE_INFO = gql`
|
||||
fragment WEBUI_UPDATE_INFO on WebUIUpdateInfo {
|
||||
channel
|
||||
tag
|
||||
}
|
||||
`;
|
||||
|
||||
export const WEBUI_UPDATE_STATUS = gql`
|
||||
${WEBUI_UPDATE_INFO}
|
||||
fragment WEBUI_UPDATE_STATUS on WebUIUpdateStatus {
|
||||
info {
|
||||
...WEBUI_UPDATE_INFO
|
||||
}
|
||||
progress
|
||||
state
|
||||
}
|
||||
`;
|
||||
@@ -2588,14 +2588,6 @@ export type PageInfoFragment = { __typename?: 'PageInfo', endCursor?: string | n
|
||||
|
||||
export type GlobalMetadataFragment = { __typename?: 'GlobalMetaType', key: string, value: string };
|
||||
|
||||
export type AboutWebuiFragment = { __typename?: 'AboutWebUI', channel: string, tag: string };
|
||||
|
||||
export type WebuiUpdateCheckFragment = { __typename?: 'WebUIUpdateCheck', channel: string, tag: string, updateAvailable: boolean };
|
||||
|
||||
export type WebuiUpdateInfoFragment = { __typename?: 'WebUIUpdateInfo', channel: string, tag: string };
|
||||
|
||||
export type WebuiUpdateStatusFragment = { __typename?: 'WebUIUpdateStatus', progress: number, state: UpdateState, info: { __typename?: 'WebUIUpdateInfo', channel: string, tag: string } };
|
||||
|
||||
export type CategoryBaseFieldsFragment = { __typename?: 'CategoryType', id: number, name: string, default: boolean, order: number };
|
||||
|
||||
export type CategoryLibraryFieldsFragment = { __typename?: 'CategoryType', id: number, name: string, default: boolean, order: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } };
|
||||
@@ -2616,6 +2608,14 @@ export type DownloadStatusFieldsFragment = { __typename?: 'DownloadStatus', stat
|
||||
|
||||
export type ExtensionListFieldsFragment = { __typename?: 'ExtensionType', pkgName: string, name: string, lang: string, versionCode: number, versionName: string, iconUrl: string, repo?: string | null, isNsfw: boolean, isInstalled: boolean, isObsolete: boolean, hasUpdate: boolean };
|
||||
|
||||
export type AboutWebuiFragment = { __typename?: 'AboutWebUI', channel: string, tag: string };
|
||||
|
||||
export type WebuiUpdateCheckFragment = { __typename?: 'WebUIUpdateCheck', channel: string, tag: string, updateAvailable: boolean };
|
||||
|
||||
export type WebuiUpdateInfoFragment = { __typename?: 'WebUIUpdateInfo', channel: string, tag: string };
|
||||
|
||||
export type WebuiUpdateStatusFragment = { __typename?: 'WebUIUpdateStatus', progress: number, state: UpdateState, info: { __typename?: 'WebUIUpdateInfo', channel: string, tag: string } };
|
||||
|
||||
export type MangaBaseFieldsFragment = { __typename?: 'MangaType', id: number, title: string, thumbnailUrl?: string | null, thumbnailUrlLastFetched?: string | null, inLibrary: boolean, initialized: boolean, sourceId: string };
|
||||
|
||||
export type MangaChapterStatFieldsFragment = { __typename?: 'MangaType', id: number, unreadCount: number, downloadCount: number, bookmarkCount: number, chapters: { __typename?: 'ChapterNodeList', totalCount: number } };
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import gql from 'graphql-tag';
|
||||
import { WEBUI_UPDATE_INFO, WEBUI_UPDATE_STATUS } from '@/lib/graphql/Fragments';
|
||||
import { WEBUI_UPDATE_INFO, WEBUI_UPDATE_STATUS } from '@/lib/graphql/fragments/InfoFragments.ts';
|
||||
|
||||
export const UPDATE_WEBUI = gql`
|
||||
${WEBUI_UPDATE_STATUS}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import gql from 'graphql-tag';
|
||||
import { ABOUT_WEBUI, WEBUI_UPDATE_CHECK, WEBUI_UPDATE_STATUS } from '@/lib/graphql/Fragments';
|
||||
import { ABOUT_WEBUI, WEBUI_UPDATE_CHECK, WEBUI_UPDATE_STATUS } from '@/lib/graphql/fragments/InfoFragments.ts';
|
||||
|
||||
export const GET_ABOUT = gql`
|
||||
${ABOUT_WEBUI}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import gql from 'graphql-tag';
|
||||
import { WEBUI_UPDATE_STATUS } from '@/lib/graphql/Fragments';
|
||||
import { WEBUI_UPDATE_STATUS } from '@/lib/graphql/fragments/InfoFragments.ts';
|
||||
|
||||
export const WEBUI_UPDATE_SUBSCRIPTION = gql`
|
||||
${WEBUI_UPDATE_STATUS}
|
||||
|
||||
Reference in New Issue
Block a user