Skip to content

Commit 6c73254

Browse files
author
Luca Forstner
committed
fix e2e test?
1 parent 94f1572 commit 6c73254

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

dev-packages/e2e-tests/test-applications/nextjs-t3/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"@trpc/react-query": "^11.0.0-rc.446",
2222
"@trpc/server": "^11.0.0-rc.446",
2323
"geist": "^1.3.0",
24-
"next": "^14.2.4",
25-
"react": "^18.3.1",
26-
"react-dom": "^18.3.1",
24+
"next": "14.2.4",
25+
"react": "18.3.1",
26+
"react-dom": "18.3.1",
2727
"server-only": "^0.0.1",
2828
"superjson": "^2.2.1",
2929
"zod": "^3.23.3"

dev-packages/e2e-tests/test-applications/nextjs-t3/src/trpc/server.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'server-only';
22

33
import { createHydrationHelpers } from '@trpc/react-query/rsc';
44
import { headers } from 'next/headers';
5-
import { cache } from 'react';
65

76
import { type AppRouter, createCaller } from '~/server/api/root';
87
import { createTRPCContext } from '~/server/api/trpc';
@@ -12,16 +11,16 @@ import { createQueryClient } from './query-client';
1211
* This wraps the `createTRPCContext` helper and provides the required context for the tRPC API when
1312
* handling a tRPC call from a React Server Component.
1413
*/
15-
const createContext = cache(() => {
14+
const createContext = () => {
1615
const heads = new Headers(headers());
1716
heads.set('x-trpc-source', 'rsc');
1817

1918
return createTRPCContext({
2019
headers: heads,
2120
});
22-
});
21+
};
2322

24-
const getQueryClient = cache(createQueryClient);
23+
const getQueryClient = createQueryClient;
2524
const caller = createCaller(createContext);
2625

2726
export const { trpc: api, HydrateClient } = createHydrationHelpers<AppRouter>(caller, getQueryClient);

0 commit comments

Comments
 (0)