I'm unable to apply a where clause to a simple count() query on a model. If I remove the where clause it works just fine and returns the number of rows in that table.
Good:
let result = await prisma.articles.count()
Bad:
let result = await prisma.articles.count({ where: { article_id: 1 } })
Error:
Unknown arg `where` in select.count.where for type undefined. Did you mean `select`? Available args:
type count {
}
It doesn't matter which column in the schema I use, same error. How do I troubleshoot this?