Skip to main content

Variable: authorKeys

const authorKeys: object

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

Query key factory for author-related queries.

Type declaration

all

all: readonly ["authors"]

Base key for all author queries

metrics()

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

Key for author metrics queries

Parameters

did

string

Returns

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

preprints()

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

Key for author preprints queries

Parameters

did

string

params?
limit

number

Returns

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

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"]

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') });