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

postQueryOptions.tsx

8 lines239 Bytes

1import { queryOptions } from '@tanstack/solid-query'
2import { fetchPost } from './posts'
3​
4export const postQueryOptions = (postId: string) =>
5 queryOptions({
6 queryKey: ['posts', { postId }],
7 queryFn: () => fetchPost(postId),
8 })