diff --git a/src/lib/graphql/generated/graphql.ts b/src/lib/graphql/generated/graphql.ts index 9db0c984..378a6958 100644 --- a/src/lib/graphql/generated/graphql.ts +++ b/src/lib/graphql/generated/graphql.ts @@ -3057,7 +3057,7 @@ export type UpdateMangaMutationVariables = Exact<{ }>; -export type UpdateMangaMutation = { __typename?: 'Mutation', updateManga?: { __typename?: 'UpdateMangaPayload', manga: { __typename?: 'MangaType', id: number, inLibrary: boolean, inLibraryAt: string } } | null, updateMangaCategories?: { __typename?: 'UpdateMangaCategoriesPayload', manga: { __typename?: 'MangaType', id: number, categories: { __typename?: 'CategoryNodeList', totalCount: number, nodes: Array<{ __typename?: 'CategoryType', id: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } }> } } } | null }; +export type UpdateMangaMutation = { __typename?: 'Mutation', updateMangaCategories?: { __typename?: 'UpdateMangaCategoriesPayload', manga: { __typename?: 'MangaType', id: number, categories: { __typename?: 'CategoryNodeList', totalCount: number, nodes: Array<{ __typename?: 'CategoryType', id: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } }> } } } | null, updateManga?: { __typename?: 'UpdateMangaPayload', manga: { __typename?: 'MangaType', id: number, inLibrary: boolean, inLibraryAt: string } } | null }; export type UpdateMangasMutationVariables = Exact<{ input: UpdateMangasInput; @@ -3066,7 +3066,7 @@ export type UpdateMangasMutationVariables = Exact<{ }>; -export type UpdateMangasMutation = { __typename?: 'Mutation', updateMangas?: { __typename?: 'UpdateMangasPayload', mangas: Array<{ __typename?: 'MangaType', id: number, inLibrary: boolean, inLibraryAt: string, categories: { __typename?: 'CategoryNodeList', totalCount: number, nodes: Array<{ __typename?: 'CategoryType', id: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } }> } }> } | null, 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 UpdateMangasMutation = { __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, updateMangas?: { __typename?: 'UpdateMangasPayload', mangas: Array<{ __typename?: 'MangaType', id: number, inLibrary: boolean, inLibraryAt: string, categories: { __typename?: 'CategoryNodeList', totalCount: number, nodes: Array<{ __typename?: 'CategoryType', id: number, mangas: { __typename?: 'MangaNodeList', totalCount: number } }> } }> } | null }; export type UpdateMangaCategoriesMutationVariables = Exact<{ input: UpdateMangaCategoriesInput; diff --git a/src/lib/graphql/mutations/MangaMutation.ts b/src/lib/graphql/mutations/MangaMutation.ts index 792cb3c5..9aca2cfc 100644 --- a/src/lib/graphql/mutations/MangaMutation.ts +++ b/src/lib/graphql/mutations/MangaMutation.ts @@ -113,13 +113,6 @@ export const UPDATE_MANGA = gql` $updateCategoryInput: UpdateMangaCategoriesInput! $updateCategories: Boolean! ) { - updateManga(input: $input) { - manga { - id - inLibrary - inLibraryAt - } - } updateMangaCategories(input: $updateCategoryInput) @include(if: $updateCategories) { manga { id @@ -134,6 +127,13 @@ export const UPDATE_MANGA = gql` } } } + updateManga(input: $input) { + manga { + id + inLibrary + inLibraryAt + } + } } `; @@ -143,11 +143,9 @@ export const UPDATE_MANGAS = gql` $updateCategoryInput: UpdateMangasCategoriesInput! $updateCategories: Boolean! ) { - updateMangas(input: $input) { + updateMangasCategories(input: $updateCategoryInput) @include(if: $updateCategories) { mangas { id - inLibrary - inLibraryAt categories { nodes { id @@ -159,9 +157,11 @@ export const UPDATE_MANGAS = gql` } } } - updateMangasCategories(input: $updateCategoryInput) @include(if: $updateCategories) { + updateMangas(input: $input) { mangas { id + inLibrary + inLibraryAt categories { nodes { id