You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently encountered a bug related to form validation when trying to submit a mutation. The bug makes it fail (the request never gets sent to the server). It looks like the generated JSON Schema $refs are improperly resolved.
It occurs when the zod-to-json-schema library used behind the scenes decides to emit a $ref to a previous property's type while declaring one that shares the same type. It does that to prevent duplication, but somehow $ref paths are seen as invalid during trpc-panel's validation before sending a request.
Hello, thanks for this library, it's great!
I recently encountered a bug related to form validation when trying to submit a mutation. The bug makes it fail (the request never gets sent to the server). It looks like the generated JSON Schema $refs are improperly resolved.
It occurs when the zod-to-json-schema library used behind the scenes decides to emit a $ref to a previous property's type while declaring one that shares the same type. It does that to prevent duplication, but somehow $ref paths are seen as invalid during trpc-panel's validation before sending a request.
An example of this can be seen in bug report #43.
A workaround is to make the zod-to-json-schema library avoid emitting $refs.
For others potentially facing the issue, I worked around it by using the following patch through pnpm's patch system:
package.json
:trpc-panel@1.3.2.patch
:The text was updated successfully, but these errors were encountered: