forked from obi1kenobi/trustfall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
171 lines (142 loc) · 3.52 KB
/
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
schema {
query: RootSchemaQuery
}
directive @filter(
"""Name of the filter operation to perform."""
op: String!
"""List of string operands for the operator."""
value: [String!]
) repeatable on FIELD | INLINE_FRAGMENT
directive @tag(
"""Name to apply to the given property field."""
name: String
) on FIELD
directive @output(
"""What to designate the output field generated from this property field."""
name: String
) on FIELD
directive @optional on FIELD
directive @recurse(
"""
Recurse up to this many times on this edge. A depth of 1 produces the current
vertex and its immediate neighbors along the given edge.
"""
depth: Int!
) on FIELD
directive @fold on FIELD
directive @transform(
"""
Name of the transformation operation to perform.
"""
op: String!
) on FIELD
type RootSchemaQuery {
MostDownloadedCrates: [Crate!]!
HackerNewsFrontPage: [HackerNewsItem!]!
HackerNewsTop(max: Int): [HackerNewsItem!]!
HackerNewsLatestStories(max: Int): [HackerNewsStory!]!
HackerNewsUser(name: String!): HackerNewsUser
}
type Crate {
name: String!
latestVersion: String!
repository: Repository
}
interface Webpage {
url: String!
}
interface Repository implements Webpage {
url: String!
}
type GitHubRepository implements Repository & Webpage {
# properties from Repository
url: String!
owner: String!
name: String!
fullName: String!
lastModified: Int! # in seconds since epoch
workflows: [GitHubWorkflow!]
# rootDirectory: Directory
}
type GitHubWorkflow {
name: String
path: String!
jobs: GitHubActionsJob
}
type GitHubActionsJob {
name: String!
runsOn: String
step: [GitHubActionsStep!]
}
interface GitHubActionsStep {
name: String
}
type GitHubActionsImportedStep implements GitHubActionsStep {
name: String
uses: String
with: [NameValuePair!]
}
type NameValuePair {
name: String!
value: String!
}
type GitHubActionsRunStep implements GitHubActionsStep {
name: String
run: [String!]!
env: [NameValuePair!]
}
interface HackerNewsItem {
id: Int!
unixTime: Int!
}
type HackerNewsJob implements HackerNewsItem {
# properties from HackerNewsItem
id: Int!
unixTime: Int!
# own properties
title: String!
score: Int!
url: String!
link: Webpage!
}
type HackerNewsStory implements HackerNewsItem {
# properties from HackerNewsItem
id: Int!
unixTime: Int!
# own properties
byUsername: String!
score: Int!
text: String
title: String!
url: String
commentsCount: Int!
# edges
byUser: HackerNewsUser!
comment: [HackerNewsComment!]
link: Webpage
}
type HackerNewsComment implements HackerNewsItem {
# properties from HackerNewsItem
id: Int!
unixTime: Int!
# own properties
text: String!
byUsername: String!
childCount: Int!
# edges
byUser: HackerNewsUser!
reply: [HackerNewsComment!]
parent: HackerNewsItem! # either a parent comment or the story being commented on
topmostAncestor: HackerNewsItem! # the ultimate ancestor of this item: a story or job
}
type HackerNewsUser {
id: String!
karma: Int!
about: String
unixCreatedAt: Int!
# The HackerNews API treats submissions of comments and stories the same way.
# The way to get only a user's submitted stories is to use this edge then
# apply a type coercion on the `HackerNewsItem` vertex on edge endpoint:
# `... on HackerNewsStory`
submitted: [HackerNewsItem!]
}