pvman
pvman
Explore posts from servers
DTDrizzle Team
Created by pvman on 6/2/2024 in #help
Reusable pgTable column helper - losing type : [x: string] instead of user_id
Thanks a bunch!!! Works perfectly.
6 replies
DTDrizzle Team
Created by pvman on 6/2/2024 in #help
Reusable pgTable column helper - losing type : [x: string] instead of user_id
When I use a var : char(name...) I have a return type of <PgCharBuilderInitial<string ... and if I use directly char("user_id") , I get the correct one : <PgCharBuilderInitial<"user_id" ...
6 replies
TtRPC
Created by kosilica on 8/22/2023 in #❓-help
useContext won't infer type from tRPC client
Do you mind sharing what old code did you delete? I'm using trpc 10.45.2 and have this error when trying to use useUtils. I also get The property '${any}' in your router collides with a built-in method, rename this router or procedure on your backend. and my trpc queries/mutations work just fine.
5 replies
TtRPC
Created by pvman on 4/11/2024 in #❓-help
> Error: Invariant: headers() expects to have requestAsyncStorage, none available
Thanks a lot for the clarification and for helping @BeBoRE , really appreciate!
8 replies
TtRPC
Created by pvman on 4/11/2024 in #❓-help
> Error: Invariant: headers() expects to have requestAsyncStorage, none available
But would like to only have to do : const post = await api.posts.getPostById(slug);
8 replies
TtRPC
Created by pvman on 4/11/2024 in #❓-help
> Error: Invariant: headers() expects to have requestAsyncStorage, none available
const api = await createServerApi();
const post = await api.posts.getPostById(slug);

const api = await createServerApi();
const post = await api.posts.getPostById(slug);

8 replies
TtRPC
Created by pvman on 4/11/2024 in #❓-help
> Error: Invariant: headers() expects to have requestAsyncStorage, none available
Oh ok, but why is it working for static route? So no way to have a single function to call in the server ? I have to do :
8 replies