Skip to main content

Function: searchAuthoritiesHandler()

searchAuthoritiesHandler(c, params): Promise<{ authorities: object[]; cursor: string; hasMore: boolean; total: number; }>

Defined in: src/api/handlers/xrpc/graph/searchAuthorities.ts:44

Handler for pub.chive.graph.searchAuthorities query.

Parameters

c

Context<ChiveEnv>

Hono context with Chive environment

params

Validated search parameters

cursor

string = ...

Pagination cursor.

limit

number = ...

Pagination limit.

q

string = ...

Search query string.

sort

"date" | "views" | "relevance" = ...

Sort order.

status

"approved" | "proposed" | "under_review" | "deprecated" = ...

type

"person" | "organization" | "concept" | "place" = ...

Returns

Promise<{ authorities: object[]; cursor: string; hasMore: boolean; total: number; }>

Paginated authority records matching search criteria

Example

GET /xrpc/pub.chive.graph.searchAuthorities?q=quantum&type=concept

Response:
{
"authorities": [...],
"total": 25,
"hasMore": true
}