-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
285 lines (248 loc) · 5.06 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
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# This file was generated based on ".graphqlconfig". Do not edit manually.
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
type DeleteAccountPayload {
count: Int
errors: [ErrorPayload]
}
type DeleteDevicePayload {
count: Int
errors: [ErrorPayload]
}
type DeleteSchedulePayload {
count: Int
errors: [ErrorPayload]
}
type Device {
active: Boolean!
createdAt: Date!
id: ID!
name: String!
schedules(
after: String
before: String
filterBy: JSONObject
first: Int
last: Int
orderBy: String
q: String
): SchedulesConnection
updatedAt: Date!
user: User
verified: Boolean!
version: Int!
}
type DeviceEdge {
cursor: String!
node: Device!
}
type DevicePayload {
device: Device
errors: [ErrorPayload]
}
type DevicesConnection {
edges: [DeviceEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type ErrorPayload {
field: String
message: [String]
}
type Mutation {
createDevice(data: CreateDeviceInput!): DevicePayload!
createSchedule(data: CreateScheduleInput!): SchedulePayload!
deleteAccount: DeleteAccountPayload!
deleteDevice(id: ID!): DeleteDevicePayload!
deleteSchedule(id: ID!): DeleteSchedulePayload!
login(data: LoginUserInput!): UserPayload!
logout: Boolean!
refreshToken: UserPayload!
signup(data: SignupUserInput!): UserPayload!
updateDevice(data: UpdateDeviceInput!, id: ID!): DevicePayload!
updateEmail(data: UpdateEmailInput): UserPayload!
updatePassword(data: UpdatePasswordInput): UserPayload!
updateProfile(data: UpdateProfileInput!): UserPayload!
updateSchedule(data: UpdateScheduleInput!, id: ID!): SchedulePayload!
}
type PageInfo {
endCursor: String!
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String!
}
type Query {
device(id: ID!): Device!
deviceCount(filterBy: JSONObject, q: String): Int!
devices(
after: String
before: String
filterBy: JSONObject
first: Int
last: Int
orderBy: String
q: String
): DevicesConnection
getGoogleAuthURL: String!
googleAuth(input: SocialAuthInput): UserPayload!
me: User!
myDevice(
after: String
before: String
filterBy: JSONObject
first: Int
last: Int
orderBy: String
q: String
): DevicesConnection
schedule(id: ID!): Schedule!
schedules(
after: String
before: String
filterBy: JSONObject
first: Int
last: Int
orderBy: String
q: String
): SchedulesConnection
schedulesCount(filterBy: JSONObject, q: String): Int!
user(id: ID!): User!
userCount(filterBy: JSONObject, q: String): Int!
users(
after: String
before: String
filterBy: JSONObject
first: Int
last: Int
orderBy: String
q: String
): UsersConnection
}
type Schedule {
active: Boolean!
createdAt: Date!
device: Device!
id: ID!
schedule: String!
updatedAt: Date!
version: Int!
}
type ScheduleEdge {
cursor: String!
node: Schedule!
}
type SchedulePayload {
errors: [ErrorPayload]
schedule: Schedule
}
type SchedulesConnection {
edges: [ScheduleEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type Subscription {
deviceAdded: Device!
scheduleAdded: Device!
}
type User {
active: Boolean!
avatar: String!
createdAt: Date!
devices(
after: String
before: String
filterBy: JSONObject
first: Int
last: Int
orderBy: String
q: String
): DevicesConnection
email: EmailAddress!
firstName: String!
googleId: String!
id: ID!
lastName: String!
password: String!
role: Roles!
updatedAt: Date!
verified: Boolean!
version: Int!
}
type UserEdge {
cursor: String!
node: User!
}
type UserPayload {
errors: [ErrorPayload]
user: User
}
type UsersConnection {
edges: [UserEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
enum Roles {
ADMIN
DEVELOPER
USER
}
"Date custom scalar type"
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."
scalar DateTime
"A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/."
scalar EmailAddress
"The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf)."
scalar JSONObject
"Integers that will have a value of 0 or more."
scalar UnsignedInt
input CreateDeviceInput {
name: String!
}
input CreateScheduleInput {
device: String!
schedule: String!
}
input LoginUserInput {
email: EmailAddress!
password: String!
}
input SignupUserInput {
email: EmailAddress!
firstName: String!
lastName: String!
password: String!
}
input SocialAuthInput {
code: String!
}
input UpdateDeviceInput {
active: Boolean
name: String
user: String
verified: Boolean
}
input UpdateEmailInput {
currentPassword: String!
email: EmailAddress!
}
input UpdatePasswordInput {
confirmPassword: String!
currentPassword: String!
newPassword: String!
}
input UpdateProfileInput {
active: Boolean
avatar: String
email: EmailAddress
firstName: String
lastName: String
verified: Boolean
}
input UpdateScheduleInput {
active: Boolean
schedule: String
}