Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Dec 5, 2022
1 parent d06701a commit 4b4e12f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/tanstack-router/client/src/utils/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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, () =>
Expand Down

0 comments on commit 4b4e12f

Please sign in to comment.