Nicolas
Nicolas17mo ago

Issue Inferring Type on Frontend with ElectroDB Query Return Statement

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
1 Reply
Nicolas
NicolasOP17mo ago
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

Did you find this page helpful?