@trpc/next 10.0.0-proxy-alpha.76 → 10.0.0-proxy-alpha.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -2
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -36,14 +36,18 @@ pnpm add @trpc/next@next @trpc/react@next @tanstack/react-query
36
36
  Setup tRPC in `utils/trpc.ts`.
37
37
 
38
38
  ```ts
39
- import { createTRPCNext } from '@trpc/next';
39
+ import { createTRPCNext, httpBatchLink } from '@trpc/next';
40
40
  // Import the router type from your server file
41
41
  import type { AppRouter } from '../pages/api/[trpc].ts';
42
42
 
43
43
  export const trpc = createTRPCNext<AppRouter>({
44
44
  config() {
45
45
  return {
46
- url: 'http://localhost:3000/api/trpc',
46
+ links: [
47
+ httpBatchLink({
48
+ url: 'http://localhost:3000/trpc',
49
+ }),
50
+ ],
47
51
  };
48
52
  },
49
53
  ssr: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/next",
3
- "version": "10.0.0-proxy-alpha.76",
3
+ "version": "10.0.0-proxy-alpha.77",
4
4
  "description": "tRPC Next lib",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -36,9 +36,9 @@
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@tanstack/react-query": "^4.0.10",
39
- "@trpc/client": "10.0.0-proxy-alpha.76",
40
- "@trpc/react": "10.0.0-proxy-alpha.76",
41
- "@trpc/server": "10.0.0-proxy-alpha.76",
39
+ "@trpc/client": "10.0.0-proxy-alpha.77",
40
+ "@trpc/react": "10.0.0-proxy-alpha.77",
41
+ "@trpc/server": "10.0.0-proxy-alpha.77",
42
42
  "next": "*",
43
43
  "react": ">=16.8.0",
44
44
  "react-dom": ">=16.8.0"
@@ -48,9 +48,9 @@
48
48
  },
49
49
  "devDependencies": {
50
50
  "@tanstack/react-query": "^4.0.10",
51
- "@trpc/client": "10.0.0-proxy-alpha.76",
52
- "@trpc/react": "10.0.0-proxy-alpha.76",
53
- "@trpc/server": "10.0.0-proxy-alpha.76",
51
+ "@trpc/client": "10.0.0-proxy-alpha.77",
52
+ "@trpc/react": "10.0.0-proxy-alpha.77",
53
+ "@trpc/server": "10.0.0-proxy-alpha.77",
54
54
  "@types/express": "^4.17.12",
55
55
  "express": "^4.17.1",
56
56
  "next": "^12.1.6",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "56bcacc869da9ee04c78c1eff2b4f9ad6ae9dece"
64
+ "gitHead": "11f75af120ffea027f5be8eabcfb50c449185355"
65
65
  }