Skip to content
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

Delete operation: Argument where of type [Model]WhereUniqueInput needs at least one of id arguments. #172

Open
StephanDecker opened this issue Jan 12, 2024 · 1 comment
Labels
is: bug Something isn't working package: generator Generator package

Comments

@StephanDecker
Copy link

Let's say we have this model.

model Example {
    id   String @id @default(uuid())
    name String
}

When looking at the delete operation the generated input ExampleExtendedWhereUniqueInput is not correct.

input ExampleExtendedWhereUniqueInput {
    OR: [ExampleWhereInput!]
    NOT: [ExampleWhereInput!]
    AND: [ExampleWhereInput!]
    id: String
    name: StringFilter
}

id: String should be mandatory: id: String!
That should only be the case when not using the @unique or @@unique directive because in that case we could also use the unique field(s) in order to specify a unique row.

@maoosi
Copy link
Owner

maoosi commented Jan 14, 2024

Yes, you are correct! Thanks for reporting the issue, I will fix it soon!

@maoosi maoosi added is: bug Something isn't working package: generator Generator package labels Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug Something isn't working package: generator Generator package
Projects
None yet
Development

No branches or pull requests

2 participants