Optionally migrate track bindings
This commit is contained in:
@@ -2890,10 +2890,11 @@ export type GetMangaToMigrateToFetchMutationVariables = Exact<{
|
||||
id: Scalars['Int']['input'];
|
||||
migrateChapters: Scalars['Boolean']['input'];
|
||||
migrateCategories: Scalars['Boolean']['input'];
|
||||
migrateTracking: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetMangaToMigrateToFetchMutation = { __typename?: 'Mutation', fetchManga: { __typename?: 'FetchMangaPayload', clientMutationId?: string | null, manga: { __typename?: 'MangaType', id: number, title: string, inLibrary: boolean, categories?: { __typename?: 'CategoryNodeList', nodes: Array<{ __typename?: 'CategoryType', id: number }> } } }, fetchChapters?: { __typename?: 'FetchChaptersPayload', chapters: Array<{ __typename?: 'ChapterType', id: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number } }> } };
|
||||
export type GetMangaToMigrateToFetchMutation = { __typename?: 'Mutation', fetchManga: { __typename?: 'FetchMangaPayload', clientMutationId?: string | null, manga: { __typename?: 'MangaType', id: number, title: string, inLibrary: boolean, categories?: { __typename?: 'CategoryNodeList', nodes: Array<{ __typename?: 'CategoryType', id: number }> }, trackRecords?: { __typename?: 'TrackRecordNodeList', nodes: Array<{ __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number }> } } }, fetchChapters?: { __typename?: 'FetchChaptersPayload', chapters: Array<{ __typename?: 'ChapterType', id: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number } }> } };
|
||||
|
||||
export type SetMangaMetadataMutationVariables = Exact<{
|
||||
input: SetMangaMetaInput;
|
||||
@@ -3181,10 +3182,11 @@ export type GetMangaToMigrateQueryVariables = Exact<{
|
||||
id: Scalars['Int']['input'];
|
||||
getChapterData: Scalars['Boolean']['input'];
|
||||
migrateCategories: Scalars['Boolean']['input'];
|
||||
migrateTracking: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetMangaToMigrateQuery = { __typename?: 'Query', manga: { __typename?: 'MangaType', id: number, inLibrary: boolean, title: string, chapters?: { __typename?: 'ChapterNodeList', totalCount: number, nodes: Array<{ __typename?: 'ChapterType', id: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number } }> }, categories?: { __typename?: 'CategoryNodeList', nodes: Array<{ __typename?: 'CategoryType', id: number }> } } };
|
||||
export type GetMangaToMigrateQuery = { __typename?: 'Query', manga: { __typename?: 'MangaType', id: number, inLibrary: boolean, title: string, chapters?: { __typename?: 'ChapterNodeList', totalCount: number, nodes: Array<{ __typename?: 'ChapterType', id: number, chapterNumber: number, isRead: boolean, isDownloaded: boolean, isBookmarked: boolean, manga: { __typename?: 'MangaType', id: number } }> }, categories?: { __typename?: 'CategoryNodeList', nodes: Array<{ __typename?: 'CategoryType', id: number }> }, trackRecords?: { __typename?: 'TrackRecordNodeList', nodes: Array<{ __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number }> } } };
|
||||
|
||||
export type GetMangasQueryVariables = Exact<{
|
||||
after?: InputMaybe<Scalars['Cursor']['input']>;
|
||||
|
||||
@@ -50,7 +50,12 @@ export const GET_MANGA_FETCH = gql`
|
||||
|
||||
// makes the server fetch and return the manga
|
||||
export const GET_MANGA_TO_MIGRATE_TO_FETCH = gql`
|
||||
mutation GET_MANGA_TO_MIGRATE_TO_FETCH($id: Int!, $migrateChapters: Boolean!, $migrateCategories: Boolean!) {
|
||||
mutation GET_MANGA_TO_MIGRATE_TO_FETCH(
|
||||
$id: Int!
|
||||
$migrateChapters: Boolean!
|
||||
$migrateCategories: Boolean!
|
||||
$migrateTracking: Boolean!
|
||||
) {
|
||||
fetchManga(input: { id: $id }) {
|
||||
clientMutationId
|
||||
manga {
|
||||
@@ -62,6 +67,13 @@ export const GET_MANGA_TO_MIGRATE_TO_FETCH = gql`
|
||||
id
|
||||
}
|
||||
}
|
||||
trackRecords @include(if: $migrateTracking) {
|
||||
nodes {
|
||||
id
|
||||
remoteId
|
||||
trackerId
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fetchChapters(input: { mangaId: $id }) @include(if: $migrateChapters) {
|
||||
|
||||
@@ -22,7 +22,12 @@ export const GET_MANGA = gql`
|
||||
|
||||
// returns the current manga from the database
|
||||
export const GET_MANGA_TO_MIGRATE = gql`
|
||||
query GET_MANGA_TO_MIGRATE($id: Int!, $getChapterData: Boolean!, $migrateCategories: Boolean!) {
|
||||
query GET_MANGA_TO_MIGRATE(
|
||||
$id: Int!
|
||||
$getChapterData: Boolean!
|
||||
$migrateCategories: Boolean!
|
||||
$migrateTracking: Boolean!
|
||||
) {
|
||||
manga(id: $id) {
|
||||
id
|
||||
inLibrary
|
||||
@@ -45,6 +50,13 @@ export const GET_MANGA_TO_MIGRATE = gql`
|
||||
id
|
||||
}
|
||||
}
|
||||
trackRecords @include(if: $migrateTracking) {
|
||||
nodes {
|
||||
id
|
||||
remoteId
|
||||
trackerId
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user