PierreP
Convex Communityโ€ข17mo agoโ€ข
28 replies
Pierre

[Convex Dashboard] Editing nested field (with union?) is causing an error

Hello team, I think there is an issue with the last Convex update: When I want to edit an union with nested fields in the dashboard (v.union(v.object(), v.object()) it reports an error, even if I respect the schema (in particular, even if I don't do any modification).

Example of validator causing an issue:

export const messagesValidator = v.object({
  foo: v.string(), // works fine
  nestedData: v.union( // Can not edit
    v.object({
      kind: v.literal('TEXT'),
      text: v.string(),
    }),
    v.object({
      kind: v.literal('IMAGE'),
      uri: v.string(),
    }),
  ),


Find attached a demo video.

Thanks in advance for your work, and on a side-note I am pretty excited to watch this Convex/TanStack video you published yesterday ๐Ÿ˜€
Was this page helpful?