-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
211 lines (193 loc) · 4.08 KB
/
schema.graphql
File metadata and controls
211 lines (193 loc) · 4.08 KB
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
"""
A date string, such as 2007-12-03, compliant with the `full-date` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
"""
scalar Date
"""
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.This scalar is serialized to a string in ISO 8601 format and parsed from a string in ISO 8601 format.
"""
scalar DateTime
input DateWhereInputArgument {
AND: [DateWhereInputArgument!]
NOT: DateWhereInputArgument
OR: [DateWhereInputArgument!]
arrayContained: [Date!]
arrayContains: [Date!]
arrayOverlaps: [Date!]
eq: Date
gt: Date
gte: Date
ilike: String
in: [Date!]
isNotNull: Boolean
isNull: Boolean
like: String
lt: Date
lte: Date
ne: Date
notIlike: String
notIn: [Date!]
notLike: String
}
input FloatWhereInputArgument {
AND: [FloatWhereInputArgument!]
NOT: FloatWhereInputArgument
OR: [FloatWhereInputArgument!]
arrayContained: [Float!]
arrayContains: [Float!]
arrayOverlaps: [Float!]
eq: Float
gt: Float
gte: Float
ilike: String
in: [Float!]
isNotNull: Boolean
isNull: Boolean
like: String
lt: Float
lte: Float
ne: Float
notIlike: String
notIn: [Float!]
notLike: String
}
input IntWhereInputArgument {
AND: [IntWhereInputArgument!]
NOT: IntWhereInputArgument
OR: [IntWhereInputArgument!]
arrayContained: [Int!]
arrayContains: [Int!]
arrayOverlaps: [Int!]
eq: Int
gt: Int
gte: Int
ilike: String
in: [Int!]
isNotNull: Boolean
isNull: Boolean
like: String
lt: Int
lte: Int
ne: Int
notIlike: String
notIn: [Int!]
notLike: String
}
"""
The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
"""
scalar JSON
enum MoodenumEnum {
happy
ok
sad
}
type Mutation {
addUser(id: Int!, name: String!): User
updateUsername(newName: String!, userId: Int!): User
}
type Post {
author: User
content: String!
id: Int
}
input PostsOrderInputArgument {
authorId: SortingParameter
content: SortingParameter
id: SortingParameter
}
input PostsWhereInputArgument {
author: UsersWhereInputArgument
authorId: IntWhereInputArgument
content: StringWhereInputArgument
id: IntWhereInputArgument
}
type Query {
posts: [Post!]
postsFiltered(where: PostsWhereInputArgument): [Post!]
"""
Get a single user by ID
"""
user(id: ID!): User!
"""
List all users
"""
users(
limit: Int
offset: Int
orderBy: UsersOrderInputArgument
where: UsersWhereInputArgument
): [User!]!
}
enum SortingParameter {
asc
desc
}
input StringWhereInputArgument {
AND: [StringWhereInputArgument!]
NOT: StringWhereInputArgument
OR: [StringWhereInputArgument!]
arrayContained: [String!]
arrayContains: [String!]
arrayOverlaps: [String!]
eq: String
gt: String
gte: String
ilike: String
in: [String!]
isNotNull: Boolean
isNull: Boolean
like: String
lt: String
lte: String
ne: String
notIlike: String
notIn: [String!]
notLike: String
}
type Subscription {
"""
Get a single user by ID
"""
user(id: ID!): User!
"""
List all users
"""
users(
limit: Int
offset: Int
orderBy: UsersOrderInputArgument
where: UsersWhereInputArgument
): [User!]!
}
type User {
id: Int!
moodcol: MoodenumEnum
name: String!
"""
Get the posts related to this user
"""
posts(
limit: Int
offset: Int
orderBy: PostsOrderInputArgument
where: PostsWhereInputArgument
): [Post!]!
somethingElse(amount: Int!): String
}
input UsersOrderInputArgument {
id: SortingParameter
moodcol: SortingParameter
name: SortingParameter
posts: PostsOrderInputArgument
}
input UsersWhereInputArgument {
id: IntWhereInputArgument
moodcol: MoodenumEnum
name: StringWhereInputArgument
posts: PostsWhereInputArgument
}