Optionally include client data during manga migration
This commit is contained in:
@@ -85,19 +85,26 @@ export const UPDATE_CATEGORY_METADATA = gql`
|
||||
${CATEGORY_META_FIELDS}
|
||||
|
||||
mutation UPDATE_CATEGORY_METADATA(
|
||||
$preUpdateDeleteInput: DeleteCategoryMetasInput!
|
||||
$hasPreUpdateDeletions: Boolean!
|
||||
$updateInput: SetCategoryMetasInput!
|
||||
$hasUpdates: Boolean!
|
||||
$deleteInput: DeleteCategoryMetasInput!
|
||||
$hasDeletions: Boolean!
|
||||
$postUpdateDeleteInput: DeleteCategoryMetasInput!
|
||||
$hasPostUpdateDeletions: Boolean!
|
||||
$migrateInput: SetCategoryMetasInput!
|
||||
$isMigration: Boolean!
|
||||
) {
|
||||
preUpdateDeletedMeta: deleteCategoryMetas(input: $preUpdateDeleteInput) @include(if: $hasPreUpdateDeletions) {
|
||||
metas {
|
||||
...CATEGORY_META_FIELDS
|
||||
}
|
||||
}
|
||||
updatedMeta: setCategoryMetas(input: $updateInput) @include(if: $hasUpdates) {
|
||||
metas {
|
||||
...CATEGORY_META_FIELDS
|
||||
}
|
||||
}
|
||||
deletedMeta: deleteCategoryMetas(input: $deleteInput) @include(if: $hasDeletions) {
|
||||
postUpdateDeletedMeta: deleteCategoryMetas(input: $postUpdateDeleteInput) @include(if: $hasPostUpdateDeletions) {
|
||||
metas {
|
||||
...CATEGORY_META_FIELDS
|
||||
}
|
||||
|
||||
@@ -162,19 +162,26 @@ export const UPDATE_CHAPTER_METADATA = gql`
|
||||
${CHAPTER_META_FIELDS}
|
||||
|
||||
mutation UPDATE_CHAPTER_METADATA(
|
||||
$preUpdateDeleteInput: DeleteChapterMetasInput!
|
||||
$hasPreUpdateDeletions: Boolean!
|
||||
$updateInput: SetChapterMetasInput!
|
||||
$hasUpdates: Boolean!
|
||||
$deleteInput: DeleteChapterMetasInput!
|
||||
$hasDeletions: Boolean!
|
||||
$postUpdateDeleteInput: DeleteChapterMetasInput!
|
||||
$hasPostUpdateDeletions: Boolean!
|
||||
$migrateInput: SetChapterMetasInput!
|
||||
$isMigration: Boolean!
|
||||
) {
|
||||
preUpdateDeletedMeta: deleteChapterMetas(input: $preUpdateDeleteInput) @include(if: $hasPreUpdateDeletions) {
|
||||
metas {
|
||||
...CHAPTER_META_FIELDS
|
||||
}
|
||||
}
|
||||
updatedMeta: setChapterMetas(input: $updateInput) @include(if: $hasUpdates) {
|
||||
metas {
|
||||
...CHAPTER_META_FIELDS
|
||||
}
|
||||
}
|
||||
deletedMeta: deleteChapterMetas(input: $deleteInput) @include(if: $hasDeletions) {
|
||||
postUpdateDeletedMeta: deleteChapterMetas(input: $postUpdateDeleteInput) @include(if: $hasPostUpdateDeletions) {
|
||||
metas {
|
||||
...CHAPTER_META_FIELDS
|
||||
}
|
||||
|
||||
@@ -3539,16 +3539,18 @@ export type UpdateCategoryOrderMutationVariables = Exact<{
|
||||
export type UpdateCategoryOrderMutation = { __typename?: 'Mutation', updateCategoryOrder?: { __typename?: 'UpdateCategoryOrderPayload', categories: Array<{ __typename?: 'CategoryType', id: number, order: number }> } | null };
|
||||
|
||||
export type UpdateCategoryMetadataMutationVariables = Exact<{
|
||||
preUpdateDeleteInput: DeleteCategoryMetasInput;
|
||||
hasPreUpdateDeletions: Scalars['Boolean']['input'];
|
||||
updateInput: SetCategoryMetasInput;
|
||||
hasUpdates: Scalars['Boolean']['input'];
|
||||
deleteInput: DeleteCategoryMetasInput;
|
||||
hasDeletions: Scalars['Boolean']['input'];
|
||||
postUpdateDeleteInput: DeleteCategoryMetasInput;
|
||||
hasPostUpdateDeletions: Scalars['Boolean']['input'];
|
||||
migrateInput: SetCategoryMetasInput;
|
||||
isMigration: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateCategoryMetadataMutation = { __typename?: 'Mutation', updatedMeta?: { __typename?: 'SetCategoryMetasPayload', metas: Array<{ __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string }> } | null, deletedMeta?: { __typename?: 'DeleteCategoryMetasPayload', metas: Array<{ __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetCategoryMetasPayload', metas: Array<{ __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string }> } | null };
|
||||
export type UpdateCategoryMetadataMutation = { __typename?: 'Mutation', preUpdateDeletedMeta?: { __typename?: 'DeleteCategoryMetasPayload', metas: Array<{ __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string }> } | null, updatedMeta?: { __typename?: 'SetCategoryMetasPayload', metas: Array<{ __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string }> } | null, postUpdateDeletedMeta?: { __typename?: 'DeleteCategoryMetasPayload', metas: Array<{ __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetCategoryMetasPayload', metas: Array<{ __typename?: 'CategoryMetaType', categoryId: number, key: string, value: string }> } | null };
|
||||
|
||||
export type GetCategoriesBaseQueryVariables = Exact<{
|
||||
after?: InputMaybe<Scalars['Cursor']['input']>;
|
||||
@@ -3656,16 +3658,18 @@ export type UpdateChaptersMutationVariables = Exact<{
|
||||
export type UpdateChaptersMutation = { __typename?: 'Mutation', updateChapters?: { __typename?: 'UpdateChaptersPayload', chapters: Array<{ __typename?: 'ChapterType', id: number, isBookmarked?: boolean, isRead?: boolean, lastReadAt?: string, lastPageRead?: number, manga?: { __typename?: 'MangaType', id: number, unreadCount: number, bookmarkCount: number, lastReadChapter?: { __typename?: 'ChapterType', id: number } | null, latestReadChapter?: { __typename?: 'ChapterType', id: number } | null, firstUnreadChapter?: { __typename?: 'ChapterType', id: number } | null } }> } | null, deleteDownloadedChapters?: { __typename?: 'DeleteDownloadedChaptersPayload', chapters: Array<{ __typename?: 'ChapterType', id: number, isDownloaded: boolean, manga: { __typename?: 'MangaType', id: number, downloadCount: number } }> } | null, trackProgress?: { __typename?: 'TrackProgressPayload', trackRecords: 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, private: boolean }> } | null };
|
||||
|
||||
export type UpdateChapterMetadataMutationVariables = Exact<{
|
||||
preUpdateDeleteInput: DeleteChapterMetasInput;
|
||||
hasPreUpdateDeletions: Scalars['Boolean']['input'];
|
||||
updateInput: SetChapterMetasInput;
|
||||
hasUpdates: Scalars['Boolean']['input'];
|
||||
deleteInput: DeleteChapterMetasInput;
|
||||
hasDeletions: Scalars['Boolean']['input'];
|
||||
postUpdateDeleteInput: DeleteChapterMetasInput;
|
||||
hasPostUpdateDeletions: Scalars['Boolean']['input'];
|
||||
migrateInput: SetChapterMetasInput;
|
||||
isMigration: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateChapterMetadataMutation = { __typename?: 'Mutation', updatedMeta?: { __typename?: 'SetChapterMetasPayload', metas: Array<{ __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string }> } | null, deletedMeta?: { __typename?: 'DeleteChapterMetasPayload', metas: Array<{ __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetChapterMetasPayload', metas: Array<{ __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string }> } | null };
|
||||
export type UpdateChapterMetadataMutation = { __typename?: 'Mutation', preUpdateDeletedMeta?: { __typename?: 'DeleteChapterMetasPayload', metas: Array<{ __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string }> } | null, updatedMeta?: { __typename?: 'SetChapterMetasPayload', metas: Array<{ __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string }> } | null, postUpdateDeletedMeta?: { __typename?: 'DeleteChapterMetasPayload', metas: Array<{ __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetChapterMetasPayload', metas: Array<{ __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string }> } | null };
|
||||
|
||||
export type GetChaptersReaderQueryVariables = Exact<{
|
||||
after?: InputMaybe<Scalars['Cursor']['input']>;
|
||||
@@ -3970,16 +3974,18 @@ export type UpdateMangasCategoriesMutationVariables = Exact<{
|
||||
export type UpdateMangasCategoriesMutation = { __typename?: 'Mutation', updateMangasCategories?: { __typename?: 'UpdateMangasCategoriesPayload', mangas: Array<{ __typename?: 'MangaType', id: number, categories: { __typename?: 'CategoryNodeList', totalCount: number, nodes: Array<{ __typename?: 'CategoryType', id: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } }> } }> } | null };
|
||||
|
||||
export type UpdateMangaMetadataMutationVariables = Exact<{
|
||||
preUpdateDeleteInput: DeleteMangaMetasInput;
|
||||
hasPreUpdateDeletions: Scalars['Boolean']['input'];
|
||||
updateInput: SetMangaMetasInput;
|
||||
hasUpdates: Scalars['Boolean']['input'];
|
||||
deleteInput: DeleteMangaMetasInput;
|
||||
hasDeletions: Scalars['Boolean']['input'];
|
||||
postUpdateDeleteInput: DeleteMangaMetasInput;
|
||||
hasPostUpdateDeletions: Scalars['Boolean']['input'];
|
||||
migrateInput: SetMangaMetasInput;
|
||||
isMigration: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateMangaMetadataMutation = { __typename?: 'Mutation', updatedMeta?: { __typename?: 'SetMangaMetasPayload', metas: Array<{ __typename?: 'MangaMetaType', mangaId: number, key: string, value: string }> } | null, deletedMeta?: { __typename?: 'DeleteMangaMetasPayload', metas: Array<{ __typename?: 'MangaMetaType', mangaId: number, key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetMangaMetasPayload', metas: Array<{ __typename?: 'MangaMetaType', mangaId: number, key: string, value: string }> } | null };
|
||||
export type UpdateMangaMetadataMutation = { __typename?: 'Mutation', preUpdateDeletedMeta?: { __typename?: 'DeleteMangaMetasPayload', metas: Array<{ __typename?: 'MangaMetaType', mangaId: number, key: string, value: string }> } | null, updatedMeta?: { __typename?: 'SetMangaMetasPayload', metas: Array<{ __typename?: 'MangaMetaType', mangaId: number, key: string, value: string }> } | null, postUpdateDeletedMeta?: { __typename?: 'DeleteMangaMetasPayload', metas: Array<{ __typename?: 'MangaMetaType', mangaId: number, key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetMangaMetasPayload', metas: Array<{ __typename?: 'MangaMetaType', mangaId: number, key: string, value: string }> } | null };
|
||||
|
||||
export type GetMangaScreenQueryVariables = Exact<{
|
||||
id: Scalars['Int']['input'];
|
||||
@@ -4014,10 +4020,11 @@ export type GetMangaToMigrateQueryVariables = Exact<{
|
||||
getChapterData: Scalars['Boolean']['input'];
|
||||
migrateCategories: Scalars['Boolean']['input'];
|
||||
migrateTracking: Scalars['Boolean']['input'];
|
||||
migrateMetadata: 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 }> }, trackRecords?: { __typename?: 'TrackRecordNodeList', nodes: Array<{ __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number, private: boolean }> } } };
|
||||
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 }, meta?: Array<{ __typename?: 'ChapterMetaType', chapterId: number, key: string, value: string }> }> }, categories?: { __typename?: 'CategoryNodeList', nodes: Array<{ __typename?: 'CategoryType', id: number }> }, trackRecords?: { __typename?: 'TrackRecordNodeList', nodes: Array<{ __typename?: 'TrackRecordType', id: number, remoteId: string, trackerId: number, private: boolean }> }, meta?: Array<{ __typename?: 'MangaMetaType', mangaId: number, key: string, value: string }> } };
|
||||
|
||||
export type GetMangasBaseQueryVariables = Exact<{
|
||||
after?: InputMaybe<Scalars['Cursor']['input']>;
|
||||
@@ -4074,16 +4081,18 @@ export type GetLibraryMangaCountQueryVariables = Exact<{ [key: string]: never; }
|
||||
export type GetLibraryMangaCountQuery = { __typename?: 'Query', mangas: { __typename?: 'MangaNodeList', totalCount: number } };
|
||||
|
||||
export type UpdateGlobalMetadataMutationVariables = Exact<{
|
||||
preUpdateDeleteInput: DeleteGlobalMetasInput;
|
||||
hasPreUpdateDeletions: Scalars['Boolean']['input'];
|
||||
updateInput: SetGlobalMetasInput;
|
||||
hasUpdates: Scalars['Boolean']['input'];
|
||||
deleteInput: DeleteGlobalMetasInput;
|
||||
hasDeletions: Scalars['Boolean']['input'];
|
||||
postUpdateDeleteInput: DeleteGlobalMetasInput;
|
||||
hasPostUpdateDeletions: Scalars['Boolean']['input'];
|
||||
migrateInput: SetGlobalMetasInput;
|
||||
isMigration: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateGlobalMetadataMutation = { __typename?: 'Mutation', updatedMeta?: { __typename?: 'SetGlobalMetasPayload', metas: Array<{ __typename?: 'GlobalMetaType', key: string, value: string }> } | null, deletedMeta?: { __typename?: 'DeleteGlobalMetasPayload', metas: Array<{ __typename?: 'GlobalMetaType', key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetGlobalMetasPayload', metas: Array<{ __typename?: 'GlobalMetaType', key: string, value: string }> } | null };
|
||||
export type UpdateGlobalMetadataMutation = { __typename?: 'Mutation', preUpdateDeletedMeta?: { __typename?: 'DeleteGlobalMetasPayload', metas: Array<{ __typename?: 'GlobalMetaType', key: string, value: string }> } | null, updatedMeta?: { __typename?: 'SetGlobalMetasPayload', metas: Array<{ __typename?: 'GlobalMetaType', key: string, value: string }> } | null, postUpdateDeletedMeta?: { __typename?: 'DeleteGlobalMetasPayload', metas: Array<{ __typename?: 'GlobalMetaType', key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetGlobalMetasPayload', metas: Array<{ __typename?: 'GlobalMetaType', key: string, value: string }> } | null };
|
||||
|
||||
export type GetGlobalMetadataQueryVariables = Exact<{
|
||||
key: Scalars['String']['input'];
|
||||
@@ -4199,16 +4208,18 @@ export type UpdateSourcePreferencesMutationVariables = Exact<{
|
||||
export type UpdateSourcePreferencesMutation = { __typename?: 'Mutation', updateSourcePreference?: { __typename?: 'UpdateSourcePreferencePayload', source: { __typename?: 'SourceType', id: string, name: string, displayName: string, lang: string, preferences: Array<{ __typename?: 'CheckBoxPreference', summary?: string | null, key?: string | null, type: 'CheckBoxPreference', CheckBoxCheckBoxCurrentValue?: boolean | null, CheckBoxDefault: boolean, CheckBoxTitle?: string | null } | { __typename?: 'EditTextPreference', text?: string | null, summary?: string | null, key?: string | null, dialogTitle?: string | null, dialogMessage?: string | null, type: 'EditTextPreference', EditTextPreferenceCurrentValue?: string | null, EditTextPreferenceDefault?: string | null, EditTextPreferenceTitle?: string | null } | { __typename?: 'ListPreference', summary?: string | null, key?: string | null, entryValues: Array<string>, entries: Array<string>, type: 'ListPreference', ListPreferenceCurrentValue?: string | null, ListPreferenceDefault?: string | null, ListPreferenceTitle?: string | null } | { __typename?: 'MultiSelectListPreference', dialogMessage?: string | null, dialogTitle?: string | null, summary?: string | null, key?: string | null, entryValues: Array<string>, entries: Array<string>, type: 'MultiSelectListPreference', MultiSelectListPreferenceTitle?: string | null, MultiSelectListPreferenceDefault?: Array<string> | null, MultiSelectListPreferenceCurrentValue?: Array<string> | null } | { __typename?: 'SwitchPreference', summary?: string | null, key?: string | null, type: 'SwitchPreference', SwitchPreferenceCurrentValue?: boolean | null, SwitchPreferenceDefault: boolean, SwitchPreferenceTitle?: string | null }> } } | null };
|
||||
|
||||
export type UpdateSourceMetadataMutationVariables = Exact<{
|
||||
preUpdateDeleteInput: DeleteSourceMetasInput;
|
||||
hasPreUpdateDeletions: Scalars['Boolean']['input'];
|
||||
updateInput: SetSourceMetasInput;
|
||||
hasUpdates: Scalars['Boolean']['input'];
|
||||
deleteInput: DeleteSourceMetasInput;
|
||||
hasDeletions: Scalars['Boolean']['input'];
|
||||
postUpdateDeleteInput: DeleteSourceMetasInput;
|
||||
hasPostUpdateDeletions: Scalars['Boolean']['input'];
|
||||
migrateInput: SetSourceMetasInput;
|
||||
isMigration: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateSourceMetadataMutation = { __typename?: 'Mutation', updatedMeta?: { __typename?: 'SetSourceMetasPayload', metas: Array<{ __typename?: 'SourceMetaType', sourceId: string, key: string, value: string }> } | null, deletedMeta?: { __typename?: 'DeleteSourceMetasPayload', metas: Array<{ __typename?: 'SourceMetaType', sourceId: string, key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetSourceMetasPayload', metas: Array<{ __typename?: 'SourceMetaType', sourceId: string, key: string, value: string }> } | null };
|
||||
export type UpdateSourceMetadataMutation = { __typename?: 'Mutation', preUpdateDeletedMeta?: { __typename?: 'DeleteSourceMetasPayload', metas: Array<{ __typename?: 'SourceMetaType', sourceId: string, key: string, value: string }> } | null, updatedMeta?: { __typename?: 'SetSourceMetasPayload', metas: Array<{ __typename?: 'SourceMetaType', sourceId: string, key: string, value: string }> } | null, postUpdateDeletedMeta?: { __typename?: 'DeleteSourceMetasPayload', metas: Array<{ __typename?: 'SourceMetaType', sourceId: string, key: string, value: string }> } | null, migrationMeta?: { __typename?: 'SetSourceMetasPayload', metas: Array<{ __typename?: 'SourceMetaType', sourceId: string, key: string, value: string }> } | null };
|
||||
|
||||
export type GetSourceBrowseQueryVariables = Exact<{
|
||||
id: Scalars['LongString']['input'];
|
||||
|
||||
@@ -175,19 +175,26 @@ export const UPDATE_MANGA_METADATA = gql`
|
||||
${MANGA_META_FIELDS}
|
||||
|
||||
mutation UPDATE_MANGA_METADATA(
|
||||
$preUpdateDeleteInput: DeleteMangaMetasInput!
|
||||
$hasPreUpdateDeletions: Boolean!
|
||||
$updateInput: SetMangaMetasInput!
|
||||
$hasUpdates: Boolean!
|
||||
$deleteInput: DeleteMangaMetasInput!
|
||||
$hasDeletions: Boolean!
|
||||
$postUpdateDeleteInput: DeleteMangaMetasInput!
|
||||
$hasPostUpdateDeletions: Boolean!
|
||||
$migrateInput: SetMangaMetasInput!
|
||||
$isMigration: Boolean!
|
||||
) {
|
||||
preUpdateDeletedMeta: deleteMangaMetas(input: $preUpdateDeleteInput) @include(if: $hasPreUpdateDeletions) {
|
||||
metas {
|
||||
...MANGA_META_FIELDS
|
||||
}
|
||||
}
|
||||
updatedMeta: setMangaMetas(input: $updateInput) @include(if: $hasUpdates) {
|
||||
metas {
|
||||
...MANGA_META_FIELDS
|
||||
}
|
||||
}
|
||||
deletedMeta: deleteMangaMetas(input: $deleteInput) @include(if: $hasDeletions) {
|
||||
postUpdateDeletedMeta: deleteMangaMetas(input: $postUpdateDeleteInput) @include(if: $hasPostUpdateDeletions) {
|
||||
metas {
|
||||
...MANGA_META_FIELDS
|
||||
}
|
||||
|
||||
@@ -12,9 +12,11 @@ import {
|
||||
MANGA_BASE_FIELDS,
|
||||
MANGA_LIBRARY_DUPLICATE_SCREEN_FIELDS,
|
||||
MANGA_LIBRARY_FIELDS,
|
||||
MANGA_META_FIELDS,
|
||||
MANGA_READER_FIELDS,
|
||||
MANGA_SCREEN_FIELDS,
|
||||
} from '@/lib/graphql/manga/MangaFragments.ts';
|
||||
import { CHAPTER_META_FIELDS } from '@/lib/graphql/chapter/ChapterFragments.ts';
|
||||
import { TRACK_RECORD_BIND_FIELDS } from '@/lib/graphql/tracker/TrackRecordFragments.ts';
|
||||
|
||||
// returns the current manga from the database
|
||||
@@ -75,11 +77,15 @@ export const GET_MANGA_CATEGORIES = gql`
|
||||
|
||||
// returns the current manga from the database
|
||||
export const GET_MANGA_TO_MIGRATE = gql`
|
||||
${MANGA_META_FIELDS}
|
||||
${CHAPTER_META_FIELDS}
|
||||
|
||||
query GET_MANGA_TO_MIGRATE(
|
||||
$id: Int!
|
||||
$getChapterData: Boolean!
|
||||
$migrateCategories: Boolean!
|
||||
$migrateTracking: Boolean!
|
||||
$migrateMetadata: Boolean!
|
||||
) {
|
||||
manga(id: $id) {
|
||||
id
|
||||
@@ -95,6 +101,9 @@ export const GET_MANGA_TO_MIGRATE = gql`
|
||||
isRead
|
||||
isDownloaded
|
||||
isBookmarked
|
||||
meta @include(if: $migrateMetadata) {
|
||||
...CHAPTER_META_FIELDS
|
||||
}
|
||||
}
|
||||
totalCount
|
||||
}
|
||||
@@ -111,6 +120,9 @@ export const GET_MANGA_TO_MIGRATE = gql`
|
||||
private
|
||||
}
|
||||
}
|
||||
meta @include(if: $migrateMetadata) {
|
||||
...MANGA_META_FIELDS
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -12,19 +12,26 @@ import { GLOBAL_METADATA } from '@/lib/graphql/common/Fragments.ts';
|
||||
export const UPDATE_GLOBAL_METADATA = gql`
|
||||
${GLOBAL_METADATA}
|
||||
mutation UPDATE_GLOBAL_METADATA(
|
||||
$preUpdateDeleteInput: DeleteGlobalMetasInput!
|
||||
$hasPreUpdateDeletions: Boolean!
|
||||
$updateInput: SetGlobalMetasInput!
|
||||
$hasUpdates: Boolean!
|
||||
$deleteInput: DeleteGlobalMetasInput!
|
||||
$hasDeletions: Boolean!
|
||||
$postUpdateDeleteInput: DeleteGlobalMetasInput!
|
||||
$hasPostUpdateDeletions: Boolean!
|
||||
$migrateInput: SetGlobalMetasInput!
|
||||
$isMigration: Boolean!
|
||||
) {
|
||||
preUpdateDeletedMeta: deleteGlobalMetas(input: $preUpdateDeleteInput) @include(if: $hasPreUpdateDeletions) {
|
||||
metas {
|
||||
...GLOBAL_METADATA
|
||||
}
|
||||
}
|
||||
updatedMeta: setGlobalMetas(input: $updateInput) @include(if: $hasUpdates) {
|
||||
metas {
|
||||
...GLOBAL_METADATA
|
||||
}
|
||||
}
|
||||
deletedMeta: deleteGlobalMetas(input: $deleteInput) @include(if: $hasDeletions) {
|
||||
postUpdateDeletedMeta: deleteGlobalMetas(input: $postUpdateDeleteInput) @include(if: $hasPostUpdateDeletions) {
|
||||
metas {
|
||||
...GLOBAL_METADATA
|
||||
}
|
||||
|
||||
@@ -39,19 +39,26 @@ export const UPDATE_SOURCE_METADATA = gql`
|
||||
${SOURCE_META_FIELDS}
|
||||
|
||||
mutation UPDATE_SOURCE_METADATA(
|
||||
$preUpdateDeleteInput: DeleteSourceMetasInput!
|
||||
$hasPreUpdateDeletions: Boolean!
|
||||
$updateInput: SetSourceMetasInput!
|
||||
$hasUpdates: Boolean!
|
||||
$deleteInput: DeleteSourceMetasInput!
|
||||
$hasDeletions: Boolean!
|
||||
$postUpdateDeleteInput: DeleteSourceMetasInput!
|
||||
$hasPostUpdateDeletions: Boolean!
|
||||
$migrateInput: SetSourceMetasInput!
|
||||
$isMigration: Boolean!
|
||||
) {
|
||||
preUpdateDeletedMeta: deleteSourceMetas(input: $preUpdateDeleteInput) @include(if: $hasPreUpdateDeletions) {
|
||||
metas {
|
||||
...SOURCE_META_FIELDS
|
||||
}
|
||||
}
|
||||
updatedMeta: setSourceMetas(input: $updateInput) @include(if: $hasUpdates) {
|
||||
metas {
|
||||
...SOURCE_META_FIELDS
|
||||
}
|
||||
}
|
||||
deletedMeta: deleteSourceMetas(input: $deleteInput) @include(if: $hasDeletions) {
|
||||
postUpdateDeletedMeta: deleteSourceMetas(input: $postUpdateDeleteInput) @include(if: $hasPostUpdateDeletions) {
|
||||
metas {
|
||||
...SOURCE_META_FIELDS
|
||||
}
|
||||
|
||||
@@ -1287,12 +1287,14 @@ export class RequestManager {
|
||||
|
||||
public updateGlobalMeta(
|
||||
{
|
||||
preUpdateDeleteInput = { keys: [] },
|
||||
updateInput = { metas: [] },
|
||||
deleteInput = { keys: [] },
|
||||
postUpdateDeleteInput = { keys: [] },
|
||||
migrateInput = { metas: [] },
|
||||
}: {
|
||||
preUpdateDeleteInput?: DeleteGlobalMetasInput;
|
||||
updateInput?: SetGlobalMetasInput;
|
||||
deleteInput?: DeleteGlobalMetasInput;
|
||||
postUpdateDeleteInput?: DeleteGlobalMetasInput;
|
||||
migrateInput?: SetGlobalMetasInput;
|
||||
},
|
||||
options?: MutationOptions<UpdateGlobalMetadataMutation, UpdateGlobalMetadataMutationVariables>,
|
||||
@@ -1301,16 +1303,27 @@ export class RequestManager {
|
||||
GQLMethod.MUTATION,
|
||||
UPDATE_GLOBAL_METADATA,
|
||||
{
|
||||
preUpdateDeleteInput,
|
||||
hasPreUpdateDeletions: !!preUpdateDeleteInput.keys?.length || !!preUpdateDeleteInput.prefixes?.length,
|
||||
updateInput,
|
||||
hasUpdates: !!updateInput.metas.length,
|
||||
deleteInput,
|
||||
hasDeletions: !!deleteInput.keys?.length || !!deleteInput.prefixes?.length,
|
||||
postUpdateDeleteInput,
|
||||
hasPostUpdateDeletions:
|
||||
!!postUpdateDeleteInput.keys?.length || !!postUpdateDeleteInput.prefixes?.length,
|
||||
migrateInput,
|
||||
isMigration: !!updateInput.metas.length,
|
||||
},
|
||||
{
|
||||
optimisticResponse: {
|
||||
__typename: 'Mutation',
|
||||
preUpdateDeletedMeta: {
|
||||
__typename: 'DeleteGlobalMetasPayload',
|
||||
metas: (preUpdateDeleteInput?.keys ?? []).map((key) => ({
|
||||
__typename: 'GlobalMetaType' as const,
|
||||
key,
|
||||
value: '',
|
||||
})),
|
||||
},
|
||||
updatedMeta: {
|
||||
__typename: 'SetGlobalMetasPayload',
|
||||
metas: (updateInput?.metas ?? []).map((meta) => ({
|
||||
@@ -1319,9 +1332,9 @@ export class RequestManager {
|
||||
value: meta.value,
|
||||
})),
|
||||
},
|
||||
deletedMeta: {
|
||||
postUpdateDeletedMeta: {
|
||||
__typename: 'DeleteGlobalMetasPayload',
|
||||
metas: (deleteInput?.keys ?? []).map((key) => ({
|
||||
metas: (postUpdateDeleteInput?.keys ?? []).map((key) => ({
|
||||
__typename: 'GlobalMetaType' as const,
|
||||
key,
|
||||
value: '',
|
||||
@@ -1337,7 +1350,11 @@ export class RequestManager {
|
||||
},
|
||||
},
|
||||
update(cache, { data }) {
|
||||
deleteInput?.keys?.forEach((key) => {
|
||||
preUpdateDeleteInput?.keys?.forEach((key) => {
|
||||
cache.evict({ id: cache.identify({ __typename: 'GlobalMetaType', key }) });
|
||||
});
|
||||
|
||||
postUpdateDeleteInput?.keys?.forEach((key) => {
|
||||
cache.evict({ id: cache.identify({ __typename: 'GlobalMetaType', key }) });
|
||||
});
|
||||
|
||||
@@ -1712,12 +1729,14 @@ export class RequestManager {
|
||||
|
||||
public updateSourceMeta(
|
||||
{
|
||||
preUpdateDeleteInput = { items: [] },
|
||||
updateInput = { items: [] },
|
||||
deleteInput = { items: [] },
|
||||
postUpdateDeleteInput = { items: [] },
|
||||
migrateInput = { items: [] },
|
||||
}: {
|
||||
preUpdateDeleteInput?: DeleteSourceMetasInput;
|
||||
updateInput?: SetSourceMetasInput;
|
||||
deleteInput?: DeleteSourceMetasInput;
|
||||
postUpdateDeleteInput?: DeleteSourceMetasInput;
|
||||
migrateInput?: SetSourceMetasInput;
|
||||
},
|
||||
options?: MutationOptions<UpdateSourceMetadataMutation, UpdateSourceMetadataMutationVariables>,
|
||||
@@ -1726,16 +1745,35 @@ export class RequestManager {
|
||||
GQLMethod.MUTATION,
|
||||
UPDATE_SOURCE_METADATA,
|
||||
{
|
||||
preUpdateDeleteInput,
|
||||
hasPreUpdateDeletions: preUpdateDeleteInput.items.some(
|
||||
(item) => !!item.keys?.length || !!item.prefixes?.length,
|
||||
),
|
||||
updateInput,
|
||||
hasUpdates: updateInput.items.some((item) => !!item.metas?.length),
|
||||
deleteInput,
|
||||
hasDeletions: deleteInput.items.some((item) => !!item.keys?.length || !!item.prefixes?.length),
|
||||
postUpdateDeleteInput,
|
||||
hasPostUpdateDeletions: postUpdateDeleteInput.items.some(
|
||||
(item) => !!item.keys?.length || !!item.prefixes?.length,
|
||||
),
|
||||
migrateInput,
|
||||
isMigration: migrateInput.items.some((item) => !!item.metas?.length),
|
||||
},
|
||||
{
|
||||
optimisticResponse: {
|
||||
__typename: 'Mutation',
|
||||
preUpdateDeletedMeta: {
|
||||
__typename: 'DeleteSourceMetasPayload',
|
||||
metas: (preUpdateDeleteInput?.items ?? []).flatMap((item) =>
|
||||
item.sourceIds.flatMap((sourceId) =>
|
||||
(item.keys ?? []).map((key) => ({
|
||||
__typename: 'SourceMetaType' as const,
|
||||
sourceId,
|
||||
key,
|
||||
value: '',
|
||||
})),
|
||||
),
|
||||
),
|
||||
},
|
||||
updatedMeta: {
|
||||
__typename: 'SetSourceMetasPayload',
|
||||
metas: (updateInput?.items ?? []).flatMap((item) =>
|
||||
@@ -1749,9 +1787,9 @@ export class RequestManager {
|
||||
),
|
||||
),
|
||||
},
|
||||
deletedMeta: {
|
||||
postUpdateDeletedMeta: {
|
||||
__typename: 'DeleteSourceMetasPayload',
|
||||
metas: (deleteInput?.items ?? []).flatMap((item) =>
|
||||
metas: (postUpdateDeleteInput?.items ?? []).flatMap((item) =>
|
||||
item.sourceIds.flatMap((sourceId) =>
|
||||
(item.keys ?? []).map((key) => ({
|
||||
__typename: 'SourceMetaType' as const,
|
||||
@@ -1777,7 +1815,17 @@ export class RequestManager {
|
||||
},
|
||||
},
|
||||
update(cache, { data }) {
|
||||
deleteInput?.items.forEach((item) =>
|
||||
preUpdateDeleteInput?.items.forEach((item) =>
|
||||
item.sourceIds.forEach((sourceId) =>
|
||||
item.keys?.forEach((key) => {
|
||||
cache.evict({
|
||||
id: cache.identify({ __typename: 'SourceMetaType', sourceId, key }),
|
||||
});
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
postUpdateDeleteInput?.items.forEach((item) =>
|
||||
item.sourceIds.forEach((sourceId) =>
|
||||
item.keys?.forEach((key) => {
|
||||
cache.evict({
|
||||
@@ -2103,6 +2151,7 @@ export class RequestManager {
|
||||
migrateCategories = false,
|
||||
migrateTracking = false,
|
||||
deleteChapters = false,
|
||||
migrateMetadata = false,
|
||||
apolloOptions: options,
|
||||
}: Partial<MetadataMigrationSettings> & {
|
||||
apolloOptions?: QueryOptions<GetMangaToMigrateQueryVariables, GetMangaToMigrateQuery>;
|
||||
@@ -2116,6 +2165,7 @@ export class RequestManager {
|
||||
getChapterData: migrateChapters || deleteChapters,
|
||||
migrateCategories,
|
||||
migrateTracking,
|
||||
migrateMetadata,
|
||||
},
|
||||
options,
|
||||
);
|
||||
@@ -2275,12 +2325,14 @@ export class RequestManager {
|
||||
|
||||
public updateMangaMeta(
|
||||
{
|
||||
preUpdateDeleteInput = { items: [] },
|
||||
updateInput = { items: [] },
|
||||
deleteInput = { items: [] },
|
||||
postUpdateDeleteInput = { items: [] },
|
||||
migrateInput = { items: [] },
|
||||
}: {
|
||||
preUpdateDeleteInput?: DeleteMangaMetasInput;
|
||||
updateInput?: SetMangaMetasInput;
|
||||
deleteInput?: DeleteMangaMetasInput;
|
||||
postUpdateDeleteInput?: DeleteMangaMetasInput;
|
||||
migrateInput?: SetMangaMetasInput;
|
||||
},
|
||||
options?: MutationOptions<UpdateMangaMetadataMutation, UpdateMangaMetadataMutationVariables>,
|
||||
@@ -2289,16 +2341,35 @@ export class RequestManager {
|
||||
GQLMethod.MUTATION,
|
||||
UPDATE_MANGA_METADATA,
|
||||
{
|
||||
preUpdateDeleteInput,
|
||||
hasPreUpdateDeletions: preUpdateDeleteInput.items.some(
|
||||
(item) => !!item.keys?.length || !!item.prefixes?.length,
|
||||
),
|
||||
updateInput,
|
||||
hasUpdates: updateInput.items.some((item) => !!item.metas?.length),
|
||||
deleteInput,
|
||||
hasDeletions: deleteInput.items.some((item) => !!item.keys?.length || !!item.prefixes?.length),
|
||||
postUpdateDeleteInput,
|
||||
hasPostUpdateDeletions: postUpdateDeleteInput.items.some(
|
||||
(item) => !!item.keys?.length || !!item.prefixes?.length,
|
||||
),
|
||||
migrateInput,
|
||||
isMigration: migrateInput.items.some((item) => !!item.metas?.length),
|
||||
},
|
||||
{
|
||||
optimisticResponse: {
|
||||
__typename: 'Mutation',
|
||||
preUpdateDeletedMeta: {
|
||||
__typename: 'DeleteMangaMetasPayload',
|
||||
metas: (preUpdateDeleteInput?.items ?? []).flatMap((item) =>
|
||||
item.mangaIds.flatMap((mangaId) =>
|
||||
(item.keys ?? []).map((key) => ({
|
||||
__typename: 'MangaMetaType' as const,
|
||||
mangaId,
|
||||
key,
|
||||
value: '',
|
||||
})),
|
||||
),
|
||||
),
|
||||
},
|
||||
updatedMeta: {
|
||||
__typename: 'SetMangaMetasPayload',
|
||||
metas: (updateInput?.items ?? []).flatMap((item) =>
|
||||
@@ -2312,9 +2383,9 @@ export class RequestManager {
|
||||
),
|
||||
),
|
||||
},
|
||||
deletedMeta: {
|
||||
postUpdateDeletedMeta: {
|
||||
__typename: 'DeleteMangaMetasPayload',
|
||||
metas: (deleteInput?.items ?? []).flatMap((item) =>
|
||||
metas: (postUpdateDeleteInput?.items ?? []).flatMap((item) =>
|
||||
item.mangaIds.flatMap((mangaId) =>
|
||||
(item.keys ?? []).map((key) => ({
|
||||
__typename: 'MangaMetaType' as const,
|
||||
@@ -2340,7 +2411,17 @@ export class RequestManager {
|
||||
},
|
||||
},
|
||||
update(cache, { data }) {
|
||||
deleteInput?.items.forEach((item) =>
|
||||
preUpdateDeleteInput?.items.forEach((item) =>
|
||||
item.mangaIds.forEach((mangaId) =>
|
||||
item.keys?.forEach((key) => {
|
||||
cache.evict({
|
||||
id: cache.identify({ __typename: 'MangaMetaType', mangaId, key }),
|
||||
});
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
postUpdateDeleteInput?.items.forEach((item) =>
|
||||
item.mangaIds.forEach((mangaId) =>
|
||||
item.keys?.forEach((key) => {
|
||||
cache.evict({
|
||||
@@ -2543,12 +2624,14 @@ export class RequestManager {
|
||||
|
||||
public updateChapterMeta(
|
||||
{
|
||||
preUpdateDeleteInput = { items: [] },
|
||||
updateInput = { items: [] },
|
||||
deleteInput = { items: [] },
|
||||
postUpdateDeleteInput = { items: [] },
|
||||
migrateInput = { items: [] },
|
||||
}: {
|
||||
preUpdateDeleteInput?: DeleteChapterMetasInput;
|
||||
updateInput?: SetChapterMetasInput;
|
||||
deleteInput?: DeleteChapterMetasInput;
|
||||
postUpdateDeleteInput?: DeleteChapterMetasInput;
|
||||
migrateInput?: SetChapterMetasInput;
|
||||
},
|
||||
options?: MutationOptions<UpdateChapterMetadataMutation, UpdateChapterMetadataMutationVariables>,
|
||||
@@ -2557,16 +2640,35 @@ export class RequestManager {
|
||||
GQLMethod.MUTATION,
|
||||
UPDATE_CHAPTER_METADATA,
|
||||
{
|
||||
preUpdateDeleteInput,
|
||||
hasPreUpdateDeletions: preUpdateDeleteInput.items.some(
|
||||
(item) => !!item.keys?.length || !!item.prefixes?.length,
|
||||
),
|
||||
updateInput,
|
||||
hasUpdates: updateInput.items.some((item) => !!item.metas?.length),
|
||||
deleteInput,
|
||||
hasDeletions: deleteInput.items.some((item) => !!item.keys?.length || !!item.prefixes?.length),
|
||||
postUpdateDeleteInput,
|
||||
hasPostUpdateDeletions: postUpdateDeleteInput.items.some(
|
||||
(item) => !!item.keys?.length || !!item.prefixes?.length,
|
||||
),
|
||||
migrateInput,
|
||||
isMigration: migrateInput.items.some((item) => !!item.metas?.length),
|
||||
},
|
||||
{
|
||||
optimisticResponse: {
|
||||
__typename: 'Mutation',
|
||||
preUpdateDeletedMeta: {
|
||||
__typename: 'DeleteChapterMetasPayload',
|
||||
metas: (preUpdateDeleteInput?.items ?? []).flatMap((item) =>
|
||||
item.chapterIds.flatMap((chapterId) =>
|
||||
(item.keys ?? []).map((key) => ({
|
||||
__typename: 'ChapterMetaType' as const,
|
||||
chapterId,
|
||||
key,
|
||||
value: '',
|
||||
})),
|
||||
),
|
||||
),
|
||||
},
|
||||
updatedMeta: {
|
||||
__typename: 'SetChapterMetasPayload',
|
||||
metas: (updateInput?.items ?? []).flatMap((item) =>
|
||||
@@ -2580,9 +2682,9 @@ export class RequestManager {
|
||||
),
|
||||
),
|
||||
},
|
||||
deletedMeta: {
|
||||
postUpdateDeletedMeta: {
|
||||
__typename: 'DeleteChapterMetasPayload',
|
||||
metas: (deleteInput?.items ?? []).flatMap((item) =>
|
||||
metas: (postUpdateDeleteInput?.items ?? []).flatMap((item) =>
|
||||
item.chapterIds.flatMap((chapterId) =>
|
||||
(item.keys ?? []).map((key) => ({
|
||||
__typename: 'ChapterMetaType' as const,
|
||||
@@ -2608,7 +2710,17 @@ export class RequestManager {
|
||||
},
|
||||
},
|
||||
update(cache, { data }) {
|
||||
deleteInput?.items.forEach((item) =>
|
||||
preUpdateDeleteInput?.items.forEach((item) =>
|
||||
item.chapterIds.forEach((chapterId) =>
|
||||
item.keys?.forEach((key) => {
|
||||
cache.evict({
|
||||
id: cache.identify({ __typename: 'ChapterMetaType', chapterId, key }),
|
||||
});
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
postUpdateDeleteInput?.items.forEach((item) =>
|
||||
item.chapterIds.forEach((chapterId) =>
|
||||
item.keys?.forEach((key) => {
|
||||
cache.evict({
|
||||
@@ -2863,12 +2975,14 @@ export class RequestManager {
|
||||
|
||||
public updateCategoryMeta(
|
||||
{
|
||||
preUpdateDeleteInput = { items: [] },
|
||||
updateInput = { items: [] },
|
||||
deleteInput = { items: [] },
|
||||
postUpdateDeleteInput = { items: [] },
|
||||
migrateInput = { items: [] },
|
||||
}: {
|
||||
preUpdateDeleteInput?: DeleteCategoryMetasInput;
|
||||
updateInput?: SetCategoryMetasInput;
|
||||
deleteInput?: DeleteCategoryMetasInput;
|
||||
postUpdateDeleteInput?: DeleteCategoryMetasInput;
|
||||
migrateInput?: SetCategoryMetasInput;
|
||||
},
|
||||
options?: MutationOptions<UpdateCategoryMetadataMutation, UpdateCategoryMetadataMutationVariables>,
|
||||
@@ -2877,16 +2991,35 @@ export class RequestManager {
|
||||
GQLMethod.MUTATION,
|
||||
UPDATE_CATEGORY_METADATA,
|
||||
{
|
||||
preUpdateDeleteInput,
|
||||
hasPreUpdateDeletions: preUpdateDeleteInput.items.some(
|
||||
(item) => !!item.keys?.length || !!item.prefixes?.length,
|
||||
),
|
||||
updateInput,
|
||||
hasUpdates: updateInput.items.some((item) => !!item.metas?.length),
|
||||
deleteInput,
|
||||
hasDeletions: deleteInput.items.some((item) => !!item.keys?.length || !!item.prefixes?.length),
|
||||
postUpdateDeleteInput,
|
||||
hasPostUpdateDeletions: postUpdateDeleteInput.items.some(
|
||||
(item) => !!item.keys?.length || !!item.prefixes?.length,
|
||||
),
|
||||
migrateInput,
|
||||
isMigration: migrateInput.items.some((item) => !!item.metas?.length),
|
||||
},
|
||||
{
|
||||
optimisticResponse: {
|
||||
__typename: 'Mutation',
|
||||
preUpdateDeletedMeta: {
|
||||
__typename: 'DeleteCategoryMetasPayload',
|
||||
metas: (preUpdateDeleteInput?.items ?? []).flatMap((item) =>
|
||||
item.categoryIds.flatMap((categoryId) =>
|
||||
(item.keys ?? []).map((key) => ({
|
||||
__typename: 'CategoryMetaType' as const,
|
||||
categoryId,
|
||||
key,
|
||||
value: '',
|
||||
})),
|
||||
),
|
||||
),
|
||||
},
|
||||
updatedMeta: {
|
||||
__typename: 'SetCategoryMetasPayload',
|
||||
metas: (updateInput?.items ?? []).flatMap((item) =>
|
||||
@@ -2900,9 +3033,9 @@ export class RequestManager {
|
||||
),
|
||||
),
|
||||
},
|
||||
deletedMeta: {
|
||||
postUpdateDeletedMeta: {
|
||||
__typename: 'DeleteCategoryMetasPayload',
|
||||
metas: (deleteInput?.items ?? []).flatMap((item) =>
|
||||
metas: (postUpdateDeleteInput?.items ?? []).flatMap((item) =>
|
||||
item.categoryIds.flatMap((categoryId) =>
|
||||
(item.keys ?? []).map((key) => ({
|
||||
__typename: 'CategoryMetaType' as const,
|
||||
@@ -2928,7 +3061,17 @@ export class RequestManager {
|
||||
},
|
||||
},
|
||||
update(cache, { data }) {
|
||||
deleteInput?.items.forEach((item) =>
|
||||
preUpdateDeleteInput?.items.forEach((item) =>
|
||||
item.categoryIds.forEach((categoryId) =>
|
||||
item.keys?.forEach((key) => {
|
||||
cache.evict({
|
||||
id: cache.identify({ __typename: 'CategoryMetaType', categoryId, key }),
|
||||
});
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
postUpdateDeleteInput?.items.forEach((item) =>
|
||||
item.categoryIds.forEach((categoryId) =>
|
||||
item.keys?.forEach((key) => {
|
||||
cache.evict({
|
||||
|
||||
Reference in New Issue
Block a user