Error in PostWhereInput.schema.ts
cnf-blueware opened this issue · comments
Bug description
runtime error when running ts-node-dev ./src/server
TypeError: Cannot read properties of undefined (reading 'nullable')
at Object.<anonymous> (/Users/nanfengcheong/Projects/my-app/prisma/trpc/schemas/objects/PostWhereInput.schema.ts:25:34)
How to reproduce
- Clone from https://github.com/omar-dulaimi/trpc-shield/tree/master/example
- Chnge schema.prisma
- run "ts-node-dev ./src/server"
Expected behavior
no error
Prisma information
generator client {
provider = "prisma-client-js"
}
generator trpc {
provider = "prisma-trpc-generator"
withMiddleware = false
withShield = false
output = "./trpc"
}
datasource db {
provider = "sqlite"
url = "file:db.sqlite"
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
title String
content String?
published Boolean @default(false)
viewCount Int @default(0)
author User? @relation(fields: [authorId], references: [id])
authorId Int?
}
Environment & setup
- OS: Mac OS
- Database: SQLite
- Node.js version: 16.15.0
Prisma Version
3.15.2
Fixed in trpc-shield@0.1.1