bill92
bill92
TtRPC
Created by swammer on 4/4/2024 in #❓-help
Lambda container reuse
are you declaring your connections outside the handler?
const db = await db.connect()
// more connections

export async function handler(){
// .. logic omitted

}
const db = await db.connect()
// more connections

export async function handler(){
// .. logic omitted

}
6 replies
TtRPC
Created by swammer on 4/4/2024 in #❓-help
Lambda container reuse
what high traffic are you experiencing?
6 replies
TtRPC
Created by bill92 on 10/12/2024 in #❓-help
Network tab returns array but data is undefined
super weird
4 replies
TtRPC
Created by bill92 on 9/18/2024 in #❓-help
Infer query type of `data`
this worked
import type { inferRouterOutputs } from '@trpc/server';

import { ApiRouter } from '@trinu/api';

export type ListPatientsOutput =
inferRouterOutputs<ApiRouter>['patient']['list-patients'];

function Content({ data }: { data: ListPatientsOutput | undefined }) {
...
}
import type { inferRouterOutputs } from '@trpc/server';

import { ApiRouter } from '@trinu/api';

export type ListPatientsOutput =
inferRouterOutputs<ApiRouter>['patient']['list-patients'];

function Content({ data }: { data: ListPatientsOutput | undefined }) {
...
}
3 replies
TtRPC
Created by bill92 on 5/24/2024 in #❓-help
conditional useQuery without input
I was going to use a mutation, but the mutation is expecting that I pass arguments
6 replies
TtRPC
Created by 'tonyyprints' on 5/11/2024 in #❓-help
Error: TRPCError: A non-domain error occurred
do you have more information?
2 replies
TtRPC
Created by bill92 on 5/9/2024 in #❓-help
Error calling middleware
anyone?
3 replies
TtRPC
Created by bill92 on 5/9/2024 in #❓-help
Error calling middleware
any ideas?
3 replies