Hey all! Is there a recommended way to update one...
# prisma-whats-new
g
Hey all! Is there a recommended way to update one field or a few fields of a type where most fields a required? Suppose I have this mutation, and I just want to update ‘title’?
Copy code
return ctx.db.mutation.updateItem(
      {
        where: { id },
        data: {
          icon,
          href,
          desc,
          title,
          keywords,
        },
I want to be able execute this in the Playground:
Copy code
mutation{
  updateItem(
    id: "cjehhjypy008k01177zefqey0"
    title: "New Title"
  )
  {
    id
    title
  }
}
And I get this error:
Copy code
"message": "icon is not defined"