I started having errors on my prisma queries all of a sudden.
Then when I opened prisma studio I receive this error:
Unable to process count query
undefined
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
}
model Journalist {
id String @id @default(auto()) @map("_id") @db.ObjectId
name String // Assuming journalists have names
photo String? // Optional photo
bio String? // Optional biography
articles Article[] // One-to-many relationship to articles
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
ClerkId String? @unique// This should match the Clerk
@@map("journalists") // Map to the 'journalists' collection in MongoDB
}
model Article {
id String @id @default(auto()) @map("_id") @db.ObjectId
title String
content String
journalistId String @db.ObjectId // This should match the Journalist
journalist Journalist @relation(fields: [journalistId], references: [id]) // Link back to Journalist
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
type String @default("private")
@@map("articles") // Map to the 'articles' collection in MongoDB
}
Bug description
I started having errors on my prisma queries all of a sudden. Then when I opened prisma studio I receive this error: Unable to process
count
query undefinedHow to reproduce
Unable to process
count
query undefinedExpected behavior
Prisma queries to work as expected.
prisma studio to load
Prisma information
// This is your Prisma schema file, // learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client { provider = "prisma-client-js" }
datasource db { provider = "mongodb" url = env("DATABASE_URL") } model Journalist { id String @id @default(auto()) @map("_id") @db.ObjectId name String // Assuming journalists have names photo String? // Optional photo bio String? // Optional biography articles Article[] // One-to-many relationship to articles createdAt DateTime @default(now()) updatedAt DateTime @updatedAt ClerkId String? @unique// This should match the Clerk @@map("journalists") // Map to the 'journalists' collection in MongoDB }
model Article { id String @id @default(auto()) @map("_id") @db.ObjectId title String content String journalistId String @db.ObjectId // This should match the Journalist journalist Journalist @relation(fields: [journalistId], references: [id]) // Link back to Journalist createdAt DateTime @default(now()) updatedAt DateTime @updatedAt type String @default("private")
@@map("articles") // Map to the 'articles' collection in MongoDB }
Environment & setup
Prisma logs
No response