DINO
DINO3mo ago

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...'.
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
})
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.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?