sh03
sh03
TtRPC
Created by sh03 on 10/26/2024 in #❓-help
Custom data transformer
It worked just fine as described above. 👍
4 replies
TtRPC
Created by Luiz F. A. Morais on 7/10/2024 in #❓-help
TRPCClientError: Unable to transform response from server
What about the server? How's that instantiated?
4 replies
TtRPC
Created by zirkelc on 6/16/2023 in #❓-help
TypeScript Alias Imports don't get resolved ont the Client
@zirkelc Thanks! Which one did you go with?
6 replies
TtRPC
Created by zirkelc on 6/16/2023 in #❓-help
TypeScript Alias Imports don't get resolved ont the Client
@zirkelc I have the exact same issue. Were you able to solve this?
6 replies
TtRPC
Created by Jacob on 11/5/2023 in #❓-help
The inferred type of 'trpc' cannot be named without a reference ...
Solved it somehow by having this in the tsconfig:
"declaration": false,
"declarationMap": false,
"declaration": false,
"declarationMap": false,
5 replies
TtRPC
Created by Jacob on 11/5/2023 in #❓-help
The inferred type of 'trpc' cannot be named without a reference ...
Having the same issue. Did you end up solving this?
5 replies
TtRPC
Created by sh03 on 3/1/2024 in #❓-help
Type 'QueryClient' is missing the following properties from type 'QueryClient': queryCache, mutation
Gotcha, thanks very much 👍
13 replies
TtRPC
Created by sh03 on 3/1/2024 in #❓-help
Type 'QueryClient' is missing the following properties from type 'QueryClient': queryCache, mutation
10.45.1 in the source code has a dependency of ^5.0.0 on tanstack react query though: https://github.com/trpc/trpc/blob/cdf215127a172e497468dec04acb8ea12e840e84/packages/react-query/package.json#L61 What am I missing? @BeBoRE
13 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
I think I got it thanks
25 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
I'm assuming db there is your repository or a Prisma extended client. What about your services?
25 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
I know, but I'm trying to understand what your way is and if it works for you
25 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
So then you call something like ctx.someService.create(...)?
25 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
Wdym by "putting service classes into the context" exactly? Sounds like what I'm looking for
25 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
Yeah I know, I was just wondering how you guys get by
25 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
The context is more of a business logic piece in my mind
25 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
TBH I don't see the context as part of the API
25 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
It's kinda cumbersome to do that though. It's also difficult to enforce that the parameter is the first/last of the series of arguments so you end up with an inconsistent library
25 replies
TtRPC
Created by sh03 on 3/8/2023 in #❓-help
How to organise reusable functions
Or a function that checks that some invariants are hold during certain operations (e.g. for a calendar app that multiple events don't overlap on the same calendar when: moving, swapping, rescheduling, etc.)
25 replies