Update "getMangasChapterIdsWithState"

This commit is contained in:
schroda
2026-05-20 16:26:43 +02:00
parent 3ae4d8d752
commit 19962df378
4 changed files with 52 additions and 40 deletions

View File

@@ -165,17 +165,27 @@ export const GET_CHAPTERS_HISTORY = gql`
export const GET_MANGAS_CHAPTER_IDS_WITH_STATE = gql`
${CHAPTER_STATE_FIELDS}
${PAGE_INFO}
query GET_MANGAS_CHAPTER_IDS_WITH_STATE(
$mangaIds: [Int!]!
$isDownloaded: Boolean = null
$isRead: Boolean = null
$isBookmarked: Boolean = null
$after: Cursor
$before: Cursor
$condition: ChapterConditionInput
$filter: ChapterFilterInput
$first: Int
$last: Int
$offset: Int
$order: [ChapterOrderInput!]
) {
chapters(
filter: { mangaId: { in: $mangaIds } }
condition: { isDownloaded: $isDownloaded, isRead: $isRead, isBookmarked: $isBookmarked }
order: [{ by: SOURCE_ORDER }]
after: $after
before: $before
condition: $condition
filter: $filter
first: $first
last: $last
offset: $offset
order: $order
) {
nodes {
...CHAPTER_STATE_FIELDS
@@ -183,6 +193,10 @@ export const GET_MANGAS_CHAPTER_IDS_WITH_STATE = gql`
scanlator
chapterNumber
}
pageInfo {
...PAGE_INFO
}
totalCount
}
}
`;

View File

@@ -931,16 +931,21 @@ export type GetChaptersHistoryQuery = {
};
export type GetMangasChapterIdsWithStateQueryVariables = Exact<{
mangaIds: Array<number> | number;
isDownloaded?: boolean | null | undefined;
isRead?: boolean | null | undefined;
isBookmarked?: boolean | null | undefined;
after?: string | null | undefined;
before?: string | null | undefined;
condition?: Types.ChapterConditionInput | null | undefined;
filter?: Types.ChapterFilterInput | null | undefined;
first?: number | null | undefined;
last?: number | null | undefined;
offset?: number | null | undefined;
order?: Array<Types.ChapterOrderInput> | Types.ChapterOrderInput | null | undefined;
}>;
export type GetMangasChapterIdsWithStateQuery = {
__typename: 'Query';
chapters: {
__typename: 'ChapterNodeList';
totalCount: number;
nodes: Array<{
__typename: 'ChapterType';
mangaId: number;
@@ -951,6 +956,13 @@ export type GetMangasChapterIdsWithStateQuery = {
isDownloaded: boolean;
isBookmarked: boolean;
}>;
pageInfo: {
__typename: 'PageInfo';
endCursor: string | null;
hasNextPage: boolean;
hasPreviousPage: boolean;
startCursor: string | null;
};
};
};