Spudfella
Spudfella
TtRPC
Created by Martin on 10/3/2024 in #❓-help
Using superjson transformer makes data empty
superjson is superannoying - with ChatGPT its easy to create your own serializers. if you want to see what that looks like, I just added them to my growing library of utils: https://github.com/arken-engineering/node/blob/main/util/rpc.ts#L31-L106
2 replies
TtRPC
Created by Spudfella on 9/3/2024 in #❓-help
Router output types not mapping?
anybody know how to get trpc/react working with the above?
4 replies
TtRPC
Created by Spudfella on 9/3/2024 in #❓-help
Router output types not mapping?
No description
4 replies
TtRPC
Created by Spudfella on 9/1/2024 in #❓-help
v11: inferRouterInputs is returning `void | <zod object>` so it's unusable?
ya inferTransformedProcedureOutput is referencing the return type, so I can't do a bi-directional reference, requiring me to abstract the zod schema, which is a pain. I hate jumping around code just to edit types
5 replies
TtRPC
Created by Spudfella on 9/1/2024 in #❓-help
v11: inferRouterInputs is returning `void | <zod object>` so it's unusable?
doesn't seem like inferRouterOutputs uses the .output but instead uses the mutation return type.. so it's a circular reference. yet the inferRouterInputs is clearly using the .input
5 replies
TtRPC
Created by Spudfella on 9/1/2024 in #❓-help
v11: inferRouterInputs is returning `void | <zod object>` so it's unusable?
adding if (!input) throw new Error('Input should not be void'); fixed it, but it shouldn't even get to the method if the data isn't sent, so that's a superfluous check. i don't think RouterInput should be returning void |
5 replies
TtRPC
Created by Spudfella on 8/30/2024 in #❓-help
Type too complex to infer?
it's working when I cast it on the other side, but that kind of defeats the purpose of trpc 😄 const { data: eras } = trpc.game.eras.useQuery<Era[]>();
6 replies
TtRPC
Created by Spudfella on 8/30/2024 in #❓-help
Type too complex to infer?
No description
6 replies
TtRPC
Created by Spudfella on 8/30/2024 in #❓-help
Type too complex to infer?
No description
6 replies
TtRPC
Created by Spudfella on 8/30/2024 in #❓-help
Type too complex to infer?
No description
6 replies