From 98e3dff35e1c64192a0845792a09f1968b146820 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Tue, 29 Apr 2025 18:00:38 -0300 Subject: [PATCH] fix(author.py): resolver load_authors_search error fix --- resolvers/author.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/resolvers/author.py b/resolvers/author.py index a4d0d153..36867032 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -303,8 +303,17 @@ async def load_authors_by(_, _info, by, limit, offset): @query.field("load_authors_search") -async def load_authors_search_resolver(_, text: str, limit: int = 10, offset: int = 0): - """Resolver for searching authors by text.""" +async def load_authors_search_resolver(_, info, text: str, limit: int = 10, offset: int = 0): + """ + Resolver for searching authors by text. Works with txt-ai search endpony. + Args: + text: Search text + limit: Maximum number of authors to return + offset: Offset for pagination + Returns: + list: List of authors matching the search criteria + """ + logger.info(f"Executing load_authors_search for text: '{text}', limit: {limit}, offset: {offset}") # Get author IDs from search engine (already sorted by relevance)