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

+page.ts

9 lines310 Bytes

1import { noop } from '@tanstack/svelte-query'
2import type { PageLoad } from './$types'
3import { postsQueryOptions } from '$lib/queries'
4​
5export const load: PageLoad = async ({ parent, fetch }) => {
6 const { queryClient } = await parent()
7​
8 await queryClient.query(postsQueryOptions(10, fetch)).catch(noop)
9}