Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

queries.ts

11 lines314 Bytes

1import { queryOptions } from '@tanstack/preact-query'
2import { waitAPI } from './api'
3​
4export const waitQueries = {
5 all: () => ['wait'] as const,
6 detail: (wait: number) =>
7 queryOptions({
8 queryKey: [...waitQueries.all(), 'detail', wait] as const,
9 queryFn: () => waitAPI.getWait(wait),
10 }),