Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
type Post {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
title: String!
published: Boolean! @default(value: "false")
author: User
comments: [Comment!]!
}
type User {
id: ID! @unique
name: String
email: String! @unique
role: Role! @default(value: "USER")
posts: [Post!]!
comments: [Comment!]!
}
type Comment {
id: ID! @unique
createdAt: DateTime!
text: String!
post: Post!
writtenBy: User!
}
enum Role {
USER
ADMIN
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.