omar-dulaimi / prisma-trpc-generator

Prisma 2+ generator to emit fully implemented tRPC routers
MIT License
676 stars 34 forks source link

CreateMany generate object schema instead of array schema #21

Closed cnf-blueware closed 2 years ago

cnf-blueware commented 2 years ago

Bug description

Seems like createmany zod schema is generating object schema similar to createone instead of generating the array schema for the data

export const CreateManySchema = z.object({
  data: CreateManyInputObjectSchema,
});

How to reproduce

Expected behavior

No response

Prisma information

Environment & setup

Prisma Version

omar-dulaimi commented 2 years ago

Hello @cnf-blueware Do you have an idea how the working version would look to you?