Skip to main content

Variable: reviewKeys

const reviewKeys: object

Defined in: web/lib/hooks/use-review.ts:68

Query key factory for review queries.

Type declaration​

all​

all: readonly ["reviews"]

Base key for all review queries

byUser()​

byUser: (did) => readonly ["reviews", "user", string]

Key for reviews by user

Parameters​

did​

string

Returns​

readonly ["reviews", "user", string]

forEprint()​

forEprint: (eprintUri) => readonly ["reviews", "eprint", string]

Key for reviews by eprint

Parameters​

eprintUri​

string

Returns​

readonly ["reviews", "eprint", string]

list()​

list: (eprintUri, params?) => readonly ["reviews", "eprint", string, "list", undefined | ReviewListParams]

Key for reviews list with filters

Parameters​

eprintUri​

string

params?​

ReviewListParams

Returns​

readonly ["reviews", "eprint", string, "list", undefined | ReviewListParams]

thread()​

thread: (reviewUri) => readonly ["reviews", "thread", string]

Key for specific review thread

Parameters​

reviewUri​

string

Returns​

readonly ["reviews", "thread", string]

threads()​

threads: () => readonly ["reviews", "thread"]

Key for review thread queries

Returns​

readonly ["reviews", "thread"]

Remarks​

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

Example​

// Invalidate all review queries
queryClient.invalidateQueries({ queryKey: reviewKeys.all });

// Invalidate reviews for a specific eprint
queryClient.invalidateQueries({ queryKey: reviewKeys.forEprint(eprintUri) });

// Invalidate a specific review thread
queryClient.invalidateQueries({ queryKey: reviewKeys.thread(reviewUri) });