From 4b4e12f310283da5a51342ab8ef4a098917920ca Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Mon, 5 Dec 2022 23:27:22 +0100 Subject: [PATCH] fix --- examples/tanstack-router/client/src/utils/router.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tanstack-router/client/src/utils/router.tsx b/examples/tanstack-router/client/src/utils/router.tsx index a68cc73ded5..a99972f9b68 100644 --- a/examples/tanstack-router/client/src/utils/router.tsx +++ b/examples/tanstack-router/client/src/utils/router.tsx @@ -53,7 +53,7 @@ const postsRoute = rootRoute.createRoute({ loaderMaxAge: 0, errorComponent: () => 'Oh crap!', loader: async () => { - const postKey = trpc.post.all.getQueryKey(); + const postKey = trpc.post.all.getQueryKey(undefined, 'query'); queryClient.getQueryData(postKey) ?? (await queryClient.prefetchQuery(postKey, getPosts)); @@ -105,7 +105,7 @@ const postsIndexRoute = postsRoute.createRoute({ const postRoute = postsRoute.createRoute({ path: '$postId', loader: async ({ params }) => { - const postKey = trpc.post.byId.getQueryKey({ id: params.postId }); + const postKey = trpc.post.byId.getQueryKey({ id: params.postId }, 'query'); queryClient.getQueryData(postKey) ?? (await queryClient.prefetchQuery(postKey, () =>