From 81a8bf3c58d608315d72e9732b57d95061f1b0b1 Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 22 Mar 2025 18:44:31 +0300 Subject: [PATCH] query-type-fix --- CHANGELOG.md | 3 +-- resolvers/author.py | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b5f937..37d617e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,8 +41,7 @@ - Implemented persistent Redis caching for author queries without TTL (invalidated only on changes) - Optimized author retrieval with separate endpoints: - `get_authors_all` - returns all non-deleted authors without statistics - - `get_authors_paginated` - returns authors with statistics and pagination support - - `load_authors_by` - optimized to use caching and efficient sorting + - `load_authors_by` - optimized to use caching and efficient sorting and pagination - Improved SQL queries with optimized JOIN conditions and efficient filtering - Added pre-aggregation of statistics (shouts count, followers count) in single efficient queries - Implemented robust cache invalidation on author updates diff --git a/resolvers/author.py b/resolvers/author.py index e4cfd794..91bad2e5 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -232,22 +232,6 @@ async def get_authors_all(_, _info): return await get_all_authors() -@query.field("get_authors_paginated") -async def get_authors_paginated(_, _info, limit=50, offset=0, by=None): - """ - Получает список авторов с пагинацией и статистикой. - - Args: - limit: Максимальное количество возвращаемых авторов - offset: Смещение для пагинации - by: Параметр сортировки (new/active) - - Returns: - list: Список авторов с их статистикой - """ - return await get_authors_with_stats(limit, offset, by) - - @query.field("get_author") async def get_author(_, _info, slug="", author_id=0): author_dict = None