Skip to contentOpen History to see the last commit
+page.ts
11 lines292 Bytes
1import type { PageLoad } from './$types' 2import { api } from '$lib/api' 4export const load: PageLoad = async ({ parent, fetch }) => { 5 const { queryClient } = await parent() 7 await queryClient.prefetchQuery({ 8 queryKey: ['posts', 10], 9 queryFn: () => api(fetch).getPosts(10),