diff --git a/CHANGELOG.md b/CHANGELOG.md index 37d617e8..4554ff14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,7 +53,6 @@ - Implemented persistent Redis caching for topic queries (no TTL, invalidated only on changes) - Optimized topic retrieval with separate endpoints for different use cases: - `get_topics_all` - returns all topics without statistics for lightweight listing - - `get_topics_paginated` - returns topics with statistics and pagination support - `get_topics_by_community` - adds pagination and optimized filtering by community - Added SQLAlchemy-managed indexes directly in ORM models for automatic schema maintenance - Created `sync_indexes()` function for automatic index synchronization during app startup diff --git a/resolvers/topic.py b/resolvers/topic.py index 855d8a82..c0f8836e 100644 --- a/resolvers/topic.py +++ b/resolvers/topic.py @@ -202,23 +202,6 @@ async def get_topics_all(_, _info): return await get_all_topics() -# Запрос на получение тем с пагинацией и статистикой -@query.field("get_topics_paginated") -async def get_topics_paginated(_, _info, limit=100, offset=0, by=None): - """ - Получает список тем с пагинацией и статистикой. - - Args: - limit: Максимальное количество возвращаемых тем - offset: Смещение для пагинации - by: Опциональные параметры сортировки - - Returns: - list: Список тем с их статистикой - """ - return await get_topics_with_stats(limit, offset, None, by) - - # Запрос на получение тем по сообществу @query.field("get_topics_by_community") async def get_topics_by_community(_, _info, community_id: int, limit=100, offset=0, by=None): diff --git a/schema/query.graphql b/schema/query.graphql index ce839aed..e07954ae 100644 --- a/schema/query.graphql +++ b/schema/query.graphql @@ -60,7 +60,7 @@ type Query { get_topic(slug: String!): Topic get_topics_all: [Topic] get_topics_by_author(slug: String, user: String, author_id: Int): [Topic] - get_topics_by_community(slug: String, community_id: Int): [Topic] + get_topics_by_community(community_id: Int!, limit: Int, offset: Int): [Topic] # notifier load_notifications(after: Int!, limit: Int, offset: Int): NotificationsResult!