Skip to content

Nestjs Prisma and Mongo issue on update #28

@DemDio

Description

@DemDio

Hello,

I am facing the following issue, when i am trying to perform update on entities.
Mongo Prisma Schema
model Post { id String @id @default(auto()) @map("_id") @db.ObjectId title String description String? ... }
I am getting the following error
Invalid prisma.post.update()` invocation:

{
where: {
id: '638354a88b6732cd4e897dbf'
},
data: {
id: '638354a88b6732cd4e897dbf',
~~
title: 'New post',
description: 'string',
...
Unknown arg id in data.id for type PostUncheckedUpdateInput. Available args:

type PostUncheckedUpdateInput {
title?: String | StringFieldUpdateOperationsInput
description?: String | NullableStringFieldUpdateOperationsInput | Null
...
}
`
Anyone knows how i can solve this ? Does adminjs support removing attributes from requests ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions