Skip to content

Feature/Bug: TRPC generator should support "Unchecked" Inputs #499

@bvkimball

Description

@bvkimball

Been looking at the TRPC generated api. Noticed the api uses the create inputs... but generates the UncheckedInputs as well... are they not used. Can they be? Should they be?

ie..

  create: z.object({
    select: z.lazy(() => CategorySelectObjectSchema.optional()),
    include: z.lazy(() => CategoryIncludeObjectSchema.optional()),
-    data: CategoryCreateInputObjectSchema,
+    data: z.union([CategoryCreateInputObjectSchema, CategoryUncheckedCreateInputObjectSchema]),
  }),

Obviously needs to be supported in the all methods: create, update, upsert etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions