@trpc/tanstack-react-query 11.27.1-canary.1.g73c019281 → 11.28.1-canary.7.g0048d55a3

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@trpc/tanstack-react-query",
3
3
  "type": "module",
4
- "version": "11.27.1-canary.1.g73c019281",
4
+ "version": "11.28.1-canary.7.g0048d55a3",
5
5
  "description": "TanStack React Query Integration for tRPC",
6
6
  "author": "juliusmarminge",
7
7
  "license": "MIT",
@@ -59,16 +59,16 @@
59
59
  ],
60
60
  "peerDependencies": {
61
61
  "@tanstack/react-query": "^5.106.0",
62
- "@trpc/client": "11.27.1-canary.1.g73c019281",
63
- "@trpc/server": "11.27.1-canary.1.g73c019281",
62
+ "@trpc/client": "11.28.1-canary.7.g0048d55a3",
63
+ "@trpc/server": "11.28.1-canary.7.g0048d55a3",
64
64
  "react": ">=18.2.0",
65
65
  "typescript": ">=5.7.2"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@tanstack/intent": "0.5.6",
69
69
  "@tanstack/react-query": "^5.107.1",
70
- "@trpc/client": "11.27.1-canary.1.g73c019281",
71
- "@trpc/server": "11.27.1-canary.1.g73c019281",
70
+ "@trpc/client": "11.28.1-canary.7.g0048d55a3",
71
+ "@trpc/server": "11.28.1-canary.7.g0048d55a3",
72
72
  "@types/node": "^24.19.2",
73
73
  "@types/react": "^19.3.0",
74
74
  "event-source-polyfill": "^1.0.31",
@@ -8,7 +8,7 @@ sources:
8
8
  metadata:
9
9
  type: lifecycle
10
10
  library: trpc
11
- library_version: 11.27.1-canary.1.g73c019281
11
+ library_version: 11.28.1-canary.7.g0048d55a3
12
12
  ---
13
13
 
14
14
  <!-- Generated from www/v11/docs/client/tanstack-react-query/migrating.md by www/build/skills.ts. Edit the docs instead. -->
@@ -11,7 +11,7 @@ sources:
11
11
  metadata:
12
12
  type: framework
13
13
  library: trpc
14
- library_version: 11.27.1-canary.1.g73c019281
14
+ library_version: 11.28.1-canary.7.g0048d55a3
15
15
  ---
16
16
 
17
17
  <!-- Generated from www/v11/docs/client/tanstack-react-query/setup.md by www/build/skills.ts. Edit the docs instead. -->
@@ -140,6 +140,12 @@ export function makeQueryClient() {
140
140
  shouldDehydrateQuery: (query) =>
141
141
  defaultShouldDehydrateQuery(query) ||
142
142
  query.state.status === 'pending',
143
+ shouldRedactErrors: (error) => {
144
+ // Next.js detects dynamic pages by catching the errors we throw, so
145
+ // we must not redact them here. Next.js redacts with a better digest
146
+ // of its own.
147
+ return false;
148
+ },
143
149
  },
144
150
  hydrate: {
145
151
  // deserializeData: superjson.deserialize,
@@ -155,6 +161,10 @@ We're setting a few default options here:
155
161
  - `shouldDehydrateQuery`: This is a function that determines whether a query should be dehydrated or not. Since the RSC transport protocol
156
162
  supports hydrating promises over the network, we extend the `defaultShouldDehydrateQuery` function to also include queries that are
157
163
  still pending. This will allow us to start prefetching in a server component high up the tree, then consuming that promise in a client component further down.
164
+ - `shouldRedactErrors`: Next.js detects dynamic rendering by looking for the `digest` on an error thrown during the render. Because
165
+ `shouldDehydrateQuery` also dehydrates queries that are still pending, a query that is pending during the build can reject afterwards,
166
+ and its error gets dehydrated and redacted before Next.js sees the `digest`. The build then fails. Returning `false` here keeps the
167
+ `digest` intact so Next.js can still recognise the error.
158
168
  - `serializeData` and `deserializeData` (optional): If you set up a [data transformer](https://trpc.io/docs/server/data-transformers) in the previous step, set this option
159
169
  to make sure the data is serialized correctly when hydrating the query client over the server-client boundary.
160
170