ItsWendell
ItsWendell
Explore posts from servers
TtRPC
Created by ItsWendell on 10/22/2023 in #❓-help
Global metadata / filters: Re-validate all queries
Was thinking about that, currently just giving it only to the queries that need it with a global recoil state, good enough for now but thanks, appreciate the response!
4 replies
TtRPC
Created by ItsWendell on 8/10/2023 in #❓-help
Deduping is broken, but is being batched
Don't know the exact cause, but we managed to remove the custom trpcQueryCache and use the built-in one which might have fixed the problem, we used it to evict the cache after logout but are now using useQueryClient() + queryClient.clear() instead.
4 replies
TtRPC
Created by Ahmed Eid on 10/10/2022 in #❓-help
somehow when move typed function out of the router files, frontend infer type to be any ?
BUT I believe this might have performance impact + it's annoying to have to think about adding this to every package that consumes the API service types
9 replies
TtRPC
Created by Ahmed Eid on 10/10/2022 in #❓-help
somehow when move typed function out of the router files, frontend infer type to be any ?
One solution I have is to use references in tsconfig like this:
{
"references": [
{
"path": "../../packages/api-service"
}
]
}
{
"references": [
{
"path": "../../packages/api-service"
}
]
}
9 replies
TtRPC
Created by Ahmed Eid on 10/10/2022 in #❓-help
somehow when move typed function out of the router files, frontend infer type to be any ?
I have a simar issue with a turbo repository, where 'second hand' types are infered as any, e.g. I have a package with the TRPC API, which might return types from an external package. I use the TRPC package types in our app, but all types that are infered from external packages are any, all types that I give directly are fine.
9 replies
TtRPC
Created by ItsWendell on 11/27/2022 in #❓-help
Proxy TRPC server to another client
Yeah that would be awesome to have, especially in the serverless context
8 replies
TtRPC
Created by ItsWendell on 11/27/2022 in #❓-help
Proxy TRPC server to another client
Since Durable Objects are not accessable outside of Workers, both of which can be viewed as servers. E.g. server A can only access server B, but I want the client to be able to access server B through server A.
8 replies
TtRPC
Created by ItsWendell on 11/27/2022 in #❓-help
Proxy TRPC server to another client
Hmh no I want to glue a specific client to a server, not a client to two servers or two routers into 1 server, I want a trpc router to act like a proxy.
8 replies
TtRPC
Created by ItsWendell on 11/27/2022 in #❓-help
Proxy TRPC server to another client
A little bit more context, the other server is a Cloudflare Workers Durable Object, which I managed to get to work with TRPC. I can essentially do: const trpc = MyDurableObject.getClient(id) which will return a TRPC client instance.
8 replies
TtRPC
Created by Ahmed Eid on 10/10/2022 in #❓-help
somehow when move typed function out of the router files, frontend infer type to be any ?
@Ahmed Eid any solution found?
9 replies