-
Notifications
You must be signed in to change notification settings - Fork 1
/
twitter-schema.graphql
109 lines (93 loc) · 1.65 KB
/
twitter-schema.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
type Tweet {
id: ID!
# The tweet text. No more than 140 characters!
body: String
# When the tweet was published
date: Date
# Who published the tweet
Author: User
# Views, retweets, likes, etc
Stats: Stat
}
type User {
id: ID!
username: String
first_name: String
last_name: String
full_name: String
name: String @deprecated
avatar_url: Url
}
type Stat {
views: Int
likes: Int
retweets: Int
responses: Int
}
type Notification {
id: ID
date: Date
type: String
}
type Meta {
count: Int
}
enum ActionExecutionCapabilitySetting {
"""
All action executions are enabled.
"""
ALL_ACTIONS
"""
All action executions are disabled.
"""
DISABLED
"""
Only actions defined within the repo are allowed.
"""
LOCAL_ACTIONS_ONLY
"""
Organization administrators action execution capabilities.
"""
NO_POLICY
}
input AddCommentInput {
"""
The contents of the comment.
"""
body: String!
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String
"""
The Node ID of the subject to modify.
"""
subjectId: ID!
}
scalar Url
scalar Date
interface Deletable {
"""
Check if the current viewer can delete this object.
"""
viewerCanDelete: Boolean!
}
type Query {
Tweet(id: ID!): Tweet
Tweets(
limit: Int
skip: Int
sort_field: String
sort_order: String
): [Tweet]
TweetsMeta: Meta
User(id: ID!): User
Notifications(limit: Int): [Notification]
NotificationsMeta: Meta
}
type Mutation {
createTweet(body: String): Tweet
deleteTweet(id: ID!): Tweet
markTweetRead(id: ID!): Boolean
}
union StatOrNotification = Stat | Notification