tRPCttRPC
Powered by
Karamazov89K
tRPC•5mo ago•
1 reply
Karamazov89

BUG: useSuspenseQuery does not forward TRPC options to context

When using useSuspenseQuery, the TRPC options are not forwarded to the context:

export const createTRPCContext = cache(
async (opts?: FetchCreateContextFnOptions) => {
// opts is undefined when called from a useSuspenseQuery
console.log(opts)

return {}
}
)

Seems like this was a solved issue (https://github.com/trpc/trpc/issues/6133) but now happening again with the new TanStack Query integration. Does anyone have a workaround for this?
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Forward NextJs Request to TRPC Server
defaultgnomeDdefaultgnome / ❓-help
2y ago
Bug? useSuspenseQuery -> isFetching doesn't change
oreqOoreq / ❓-help
2y ago
tRPC context, NeonDB & WebSockets
kgniKkgni / ❓-help
2y ago