Feature/add option to remove manga from categories when removing from library (#633)
* Optionally remove manga categories when removing them from library * Use "Mangas::removeFromLibrary" * Handle uncatched promises
This commit is contained in:
@@ -2842,10 +2842,12 @@ export type UpdateMangaMutation = { __typename?: 'Mutation', updateManga: { __ty
|
||||
|
||||
export type UpdateMangasMutationVariables = Exact<{
|
||||
input: UpdateMangasInput;
|
||||
updateCategoryInput: UpdateMangasCategoriesInput;
|
||||
updateCategories: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateMangasMutation = { __typename?: 'Mutation', updateMangas: { __typename?: 'UpdateMangasPayload', clientMutationId?: string | null, mangas: Array<{ __typename?: 'MangaType', id: number, inLibrary: boolean, inLibraryAt: any, categories: { __typename?: 'CategoryNodeList', totalCount: number, nodes: Array<{ __typename?: 'CategoryType', id: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } }> } }> } };
|
||||
export type UpdateMangasMutation = { __typename?: 'Mutation', updateMangas: { __typename?: 'UpdateMangasPayload', clientMutationId?: string | null, mangas: Array<{ __typename?: 'MangaType', id: number, inLibrary: boolean, inLibraryAt: any, categories: { __typename?: 'CategoryNodeList', totalCount: number, nodes: Array<{ __typename?: 'CategoryType', id: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } }> } }> }, 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 } }> } }> } };
|
||||
|
||||
export type UpdateMangaCategoriesMutationVariables = Exact<{
|
||||
input: UpdateMangaCategoriesInput;
|
||||
|
||||
@@ -130,7 +130,11 @@ export const UPDATE_MANGA = gql`
|
||||
`;
|
||||
|
||||
export const UPDATE_MANGAS = gql`
|
||||
mutation UPDATE_MANGAS($input: UpdateMangasInput!) {
|
||||
mutation UPDATE_MANGAS(
|
||||
$input: UpdateMangasInput!
|
||||
$updateCategoryInput: UpdateMangasCategoriesInput!
|
||||
$updateCategories: Boolean!
|
||||
) {
|
||||
updateMangas(input: $input) {
|
||||
clientMutationId
|
||||
mangas {
|
||||
@@ -148,6 +152,20 @@ export const UPDATE_MANGAS = gql`
|
||||
}
|
||||
}
|
||||
}
|
||||
updateMangasCategories(input: $updateCategoryInput) @include(if: $updateCategories) {
|
||||
mangas {
|
||||
id
|
||||
categories {
|
||||
nodes {
|
||||
id
|
||||
mangas {
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user