-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throws "TypeError: Cannot read property 'args' of undefined" error when @ignore is present #218
Comments
I think that you use |
Fixed via 2fbe4a4 🔒 |
@MichalLytek apologies, I probably posted not the best sample. generator client {
provider = "prisma-client-js"
}
generator typegraphql {
provider = "typegraphql-prisma"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model File {
id String @id @default(cuid())
ownerId String @map("owner_id")
owner User @relation("file_owner", fields: [ownerId], references: [id])
posts Post[] @relation("post_thumbnail") @ignore
@@map("files")
}
model User {
id String @id @default(cuid())
uploadedFiles File[] @relation("file_owner")
@@map("users")
}
model Post {
id String @id @default(cuid())
thumbnailId String
thumbnail File @relation("post_thumbnail", fields: [thumbnailId], references: [id], onDelete: SetNull)
} I want to be able to access Anyway, seems like you fixed this on |
Today will be a new release, as always 😉 |
Sample schema:
When
@ignore
decorator is present (File
model,owner
relation) -typegraphql-prisma
throws the following error:Environment:
typegraphql-prisma
version0.18.1
3.6.0
4.3.5
Additional Context
https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#ignore
The text was updated successfully, but these errors were encountered: