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, () =>