-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatamodel.graphql
51 lines (48 loc) · 1.18 KB
/
datamodel.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
type Tweet {
id: ID! @unique
# The text for a tweet. No more than 280 characters.
body: String!
# The date the tweet was published.
createdAt: DateTime!
# The user that published the tweet.
postedBy: User
# Meta data about the tweet, views, retweets, and likes.
stats: Stat
}
type User {
id: ID! @unique
# The username of the user.
username: String! @unique
# The first_name of the user.
firstName: String
# The last name of the user.
lastName: String
# The full name of the user.
fullName: String!
# The email address of the user.
email: String! @unique
# The password the user has chosen (hashed, not exposed in query)
password: String!
# The url for the avatar of the user.
avatar: String
# Tweets from the user
tweets: [Tweet!]!
}
type Stat {
id: ID! @unique
# The number of views for a tweet.
views: Int!
# The number of likes for a tweet.
likes: Int!
# The number of retweets for a tweet.
retweets: Int!
# The number of responses a tweet has accumulated.
responses: Int!
}
type Notification {
id: ID! @unique
# The date the notification was created
createdAt: DateTime!
# The "Type" of the notification
type: String!
}