hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
67 stars 44 forks source link

Broken types on frontend for trpc #7154

Closed burtonator closed 5 months ago

burtonator commented 6 months ago

Describe the bug

I found a nasty bug where the typescript types with Zod and TPRC are not working properly.

This manifested itself in a problem where the client failed to execute a query:

image

The work around was convert the topicId from a number to a string:

topicId: topicId ? `${topicId}` : undefined,

but this shouldn't have even been possible. It should have been caught.

burtonator commented 6 months ago

Changing the underlying type and rebuilding doesn't fix this problem.

burtonator commented 6 months ago

We might be able to move the types for these to a new types repository that's strict.

ForestMars commented 5 months ago

Looks like CICD automation is no longer closing tickets when the linked PR is merged @burtonator @jnaviask