T
tRPC

Issue Inferring Type on Frontend with ElectroDB Query Return Statement

Issue Inferring Type on Frontend with ElectroDB Query Return Statement

NMNick Montoya8/31/2023
Hi all, I am using ElectroDB to work with DynamoDB, and I have a Lambda function that uses tRPC that uses ElectroDB commands to read/write to my database. I have a weird situation where the backend tRPC can infer the return type properly from my ElectroDB queries, but on the frontend (React), it says that the useQuery() response is of type any Attached screenshots show this
No description
No description
NMNick Montoya8/31/2023
To fix it, I need to create a duplicate type of the return and then cast the return statement with it, like this is works. But I shouldn't need to do that.
No description
No description

Looking for more? Join the community!

T
tRPC

Issue Inferring Type on Frontend with ElectroDB Query Return Statement

Join Server