Nick
Nick
TtRPC
Created by Nick on 6/23/2023 in #❓-help
tRPC 10 Mutations Firing Twice in Deployed Releases Only
this was a next issue rather than a trpc issue,c losing
3 replies
TtRPC
Created by Nick on 6/23/2023 in #❓-help
tRPC 10 Mutations Firing Twice in Deployed Releases Only
ah was missing an await in a middleware call... when a middleware authorized function was firing inside a middleware without await on it, the operation would call again when that middleware finished.
3 replies
TtRPC
Created by dang on 6/21/2023 in #❓-help
Migrating v9 to v10 - - using the client?
previously you could use the TRPCClient type
7 replies
TtRPC
Created by dang on 6/21/2023 in #❓-help
Migrating v9 to v10 - - using the client?
@s.daniel What if that client is being passed as an argument to a component, how would it be typed?
7 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
The real answer to this is legacy routers are completely incompatible with CreateTRPCNextBase.
15 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
Thanks for the suggestion
15 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
I’ll meet you halfway on PEBCAK, as it would be helpful to see a working example of a legacy router in tRPC 10’s resources in addition to more detail in the v10 migration guide for those of us with robust v9 implementations.
15 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
I have a standalone query procedure on the legacy router called "health", this and all my other legacy procedures show up as the following on the CreateTRPCNextBase type: queries: MigrateProcedureRecord<RootConfig<{ ctx...}; errorShape: DefaultErrorShape; meta: {}; transformer: DefaultDataTransformer; }>, SwapContext<SwapContext<{}, { ...ctx }>, { ...ctx }> & Record<"health", Procedure<{ ...ctx }, { ...ctx }, {}, undefined, undefined, string, unknown, string>>
15 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
if I do const allTasks = trpc['tasks']['findAll'].useQuery(); for a legacy query I don't get a type error, but that seems like a workaround rather than intended usage
15 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
Since these legacy procedures work (e.g. trpc.tasks.getAll) but are not reflected in typeof appRouter, I wonder if this is a type inference bug with mergeRouters
15 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
My router appears to only be getting the typing of mainRouter (trpc 10 router with greeting) from appRouter = mergeRouters(legacyRouter, mainRouter);
15 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
and that breaks the query methods (e.g. tasks.getTasks or w/e)
15 replies
TtRPC
Created by Nick on 6/7/2023 in #❓-help
trpc.legacyRouterName.procedure "does not exist" on type CreateTRPCNextBase, runs anyway
Still not found
15 replies
TtRPC
Created by Nick on 6/6/2023 in #❓-help
createTRPCNext Type Error + useQuery Not Defined
The issue was that I was using the old trpc 9 useQuery syntax rather than the new trpc 10 syntax
3 replies
TtRPC
Created by Nick on 6/6/2023 in #❓-help
Not getting legacy router ops in merged tRPC 9 router
Yeah that isn’t an example project, that is documentation I’ve already been following. Thanks anyway
5 replies
TtRPC
Created by Nick on 6/6/2023 in #❓-help
Not getting legacy router ops in merged tRPC 9 router
I’ve copied the components/style in this one and that is how I got to this point, are there any examples with merged legacy routers?
5 replies
TtRPC
Created by Nick on 6/5/2023 in #❓-help
TRPCContextState not found in v10
Thanks Katt, that does it... seems so obvious now 😂
13 replies
TtRPC
Created by Nick on 6/5/2023 in #❓-help
TRPCContextState not found in v10
We're putting trpc.utils in ReactContext state, so we've been using TRPCContextState for trpc.utils in ReactContext interface
13 replies
TtRPC
Created by Nick on 6/5/2023 in #❓-help
TRPCContextState not found in v10
perhaps a better question: is there a type we can use for trpc.useContext() in trpc 10?
13 replies