Fix/add manga to library without dialog not adding default categories (#632)
* Add default categories when adding manga to library without dialog * Add manga to library and update categories in one mutation
This commit is contained in:
@@ -2833,10 +2833,12 @@ export type SetMangaMetadataMutation = { __typename?: 'Mutation', setMangaMeta:
|
||||
|
||||
export type UpdateMangaMutationVariables = Exact<{
|
||||
input: UpdateMangaInput;
|
||||
updateCategoryInput: UpdateMangaCategoriesInput;
|
||||
updateCategories: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateMangaMutation = { __typename?: 'Mutation', updateManga: { __typename?: 'UpdateMangaPayload', clientMutationId?: string | null, manga: { __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 UpdateMangaMutation = { __typename?: 'Mutation', updateManga: { __typename?: 'UpdateMangaPayload', clientMutationId?: string | null, manga: { __typename?: 'MangaType', id: number, inLibrary: boolean, inLibraryAt: any } }, updateMangaCategories?: { __typename?: 'UpdateMangaCategoriesPayload', manga: { __typename?: 'MangaType', id: number, categories: { __typename?: 'CategoryNodeList', totalCount: number, nodes: Array<{ __typename?: 'CategoryType', id: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } }> } } } };
|
||||
|
||||
export type UpdateMangasMutationVariables = Exact<{
|
||||
input: UpdateMangasInput;
|
||||
|
||||
@@ -99,13 +99,22 @@ export const SET_MANGA_METADATA = gql`
|
||||
`;
|
||||
|
||||
export const UPDATE_MANGA = gql`
|
||||
mutation UPDATE_MANGA($input: UpdateMangaInput!) {
|
||||
mutation UPDATE_MANGA(
|
||||
$input: UpdateMangaInput!
|
||||
$updateCategoryInput: UpdateMangaCategoriesInput!
|
||||
$updateCategories: Boolean!
|
||||
) {
|
||||
updateManga(input: $input) {
|
||||
clientMutationId
|
||||
manga {
|
||||
id
|
||||
inLibrary
|
||||
inLibraryAt
|
||||
}
|
||||
}
|
||||
updateMangaCategories(input: $updateCategoryInput) @include(if: $updateCategories) {
|
||||
manga {
|
||||
id
|
||||
categories {
|
||||
nodes {
|
||||
id
|
||||
|
||||
Reference in New Issue
Block a user