Created
March 13, 2019 19:07
-
-
Save nikolasburk/db3c8e052c8e640f51f60c1ac16d92d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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