DINOD
tRPC16mo ago
1 reply
DINO

Migrating to v11 problem: 'reactQueryContext' does not exist in type 'CreateTRPCReactOptions

Hello,
When I upgraded to v11, I got this error that I didn't know how to solve it.
Object literal may only specify known properties, and 'reactQueryContext' does not exist in type 'CreateTRPCReactOptions<BuiltRouter<{ ctx: { req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypePro...'.

This is my code:
export const contextZS = createContext<QueryClient | undefined>(undefined)

export const trpcReact = createTRPCReact<AppRouter>()
export const trpcReactZS = createTRPCReact<AppRouterZS>({
  context: createContext(null),
  reactQueryContext: contextZS
})

I would really appreciate any help. Thanks.
Was this page helpful?