Skip to content

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

@StephanDecker

Description

@StephanDecker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions