Replace deprecated gql sort inputs

Was missed in e1e2cbc679 and caused unexpected behaviour due to the response data being incorrectly sorted
This commit is contained in:
schroda
2024-07-29 14:10:37 +02:00
parent e99ed3eec5
commit b17fcd30af
2 changed files with 7 additions and 8 deletions

View File

@@ -135,7 +135,7 @@ export const GET_MANGAS_CHAPTER_IDS_WITH_STATE = gql`
chapters(
filter: { mangaId: { in: $mangaIds } }
condition: { isDownloaded: $isDownloaded, isRead: $isRead, isBookmarked: $isBookmarked }
orderBy: SOURCE_ORDER
order: [{ by: SOURCE_ORDER }]
) {
nodes {
...CHAPTER_STATE_FIELDS

View File

@@ -1864,9 +1864,8 @@ export class RequestManager {
document,
{
condition: { mangaId: Number(mangaId) },
orderBy: ChapterOrderBy.SourceOrder,
orderByType: SortOrder.Desc,
} as unknown as Variables,
order: [{ by: ChapterOrderBy.SourceOrder, byType: SortOrder.Desc }],
} satisfies GetChaptersMangaQueryVariables as unknown as Variables,
options,
);
}
@@ -2048,8 +2047,8 @@ export class RequestManager {
GQLMethod.USE_QUERY,
document,
{
orderBy: CategoryOrderBy.Order,
} as unknown as Variables,
order: [{ by: CategoryOrderBy.Order }],
} satisfies GetCategoriesSettingsQueryVariables as unknown as Variables,
options,
);
}
@@ -2062,8 +2061,8 @@ export class RequestManager {
GQLMethod.QUERY,
document,
{
orderBy: CategoryOrderBy.Order,
} as unknown as Variables,
order: [{ by: CategoryOrderBy.Order }],
} satisfies GetCategoriesSettingsQueryVariables as unknown as Variables,
options,
);
}