Skip to main content

Variable: authorKeys

const authorKeys: object

Defined in: web/lib/hooks/use-author.ts:34

Query key factory for author-related queries.

Type declaration​

all​

all: readonly ["authors"]

Base key for all author queries

eprints()​

eprints: (did, params?) => readonly ["authors", "eprints", string, undefined | { limit: number; }]

Key for author eprints queries

Parameters​

did​

string

params?​
limit​

number

Returns​

readonly ["authors", "eprints", string, undefined | { limit: number; }]

metrics()​

metrics: (did) => readonly ["authors", "metrics", string]

Key for author metrics queries

Parameters​

did​

string

Returns​

readonly ["authors", "metrics", string]

profile()​

profile: (did) => readonly ["authors", "profile", string]

Key for specific author profile query

Parameters​

did​

string

Returns​

readonly ["authors", "profile", string]

profiles()​

profiles: () => readonly ["authors", "profile"]

Key for author profile queries

Returns​

readonly ["authors", "profile"]

search: (query, limit?) => readonly ["authors", "search", string, undefined | number]

Key for author search queries

Parameters​

query​

string

limit?​

number

Returns​

readonly ["authors", "search", string, undefined | number]

Remarks​

Follows TanStack Query best practices for cache key management. Enables fine-grained cache invalidation for author data.

Example​

// Invalidate all author queries
queryClient.invalidateQueries({ queryKey: authorKeys.all });

// Invalidate specific author
queryClient.invalidateQueries({ queryKey: authorKeys.profile('did:plc:abc') });