```model Comment { id Int @id @defa...
# orm-help
a
Copy code
model Comment {
  id        Int       @id @default(autoincrement())
  createdAt DateTime  @default(now()) @map("created_at")
  updatedAt DateTime  @updatedAt @map("updated_at")
  content   String
  author    User      @relation(fields: [authorId], references: [id])
  authorId  Int       @map("author_id")
  post      Post      @relation(fields: [postId], references: [id])
  postId    Int       @map("post_id")
  parent    Comment?  @relation("CommentToComment", fields: [parentId], references: [id])
  parentId  Int?      @map("parent_id")
  replies   Comment[] @relation("CommentToComment")

  @@map("comments")
}

type Comment {
  id: Int!
  createdAt: DateTime!
  updatedAt: DateTime!
  content: String!
  author: User!
  post: Post!
  parent: Comment
  replies: [Comment!]
}
Am I representing my Prisma Model correctly with GraphQL?
r
Seems fine to me at first glance.
🙌 1