Skip to content

Commit 14deb9f

Browse files
authored
User Settings (codesandbox#4033)
1 parent 08d8ef8 commit 14deb9f

File tree

11 files changed

+485
-223
lines changed

11 files changed

+485
-223
lines changed

packages/app/src/app/graphql/schema.graphql

Lines changed: 85 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# source: https://codesandbox.io/api/graphql
2-
# timestamp: Wed Apr 29 2020 14:46:25 GMT+0200 (Central European Summer Time)
2+
# timestamp: Thu Apr 30 2020 18:52:01 GMT+0200 (Central European Summer Time)
33

44
schema {
55
query: RootQuery
@@ -163,81 +163,84 @@ The metadata of a reference
163163
union ReferenceMetadata = CodeReferenceMetadata
164164

165165
type RootMutation {
166-
"""
167-
Clear notification unread count
168-
"""
169-
clearNotificationCount: User
166+
revokeSandboxInvitation(invitationId: ID!, sandboxId: ID!): Invitation!
170167

171168
"""
172-
Remove someone from a team
169+
Create a team
173170
"""
174-
removeFromTeam(teamId: ID!, userId: ID!): Team!
171+
createTeam(name: String!): Team!
175172

176173
"""
177-
Unbookmark a template
174+
Delete sandboxes
178175
"""
179-
unbookmarkTemplate(teamId: ID, templateId: ID!): Template
176+
deleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
177+
createSandboxInvitation(
178+
authorization: Authorization!
179+
email: String!
180+
sandboxId: ID!
181+
): Invitation!
180182

181183
"""
182-
Accept an invitation to a team
184+
Make templates from sandboxes
183185
"""
184-
acceptTeamInvitation(teamId: ID!): Team!
186+
makeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
187+
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID!]!): [Sandbox!]!
188+
resolveComment(commentId: ID!, sandboxId: ID!): Comment!
185189

186190
"""
187-
Change authorization of a collaborator
191+
Rename a collection and all subfolders
188192
"""
189-
changeCollaboratorAuthorization(
190-
authorization: Authorization!
191-
sandboxId: ID!
192-
username: String!
193-
): Collaborator!
193+
renameCollection(
194+
newPath: String!
195+
newTeamId: ID
196+
path: String!
197+
teamId: ID
198+
): [Collection!]!
194199

195200
"""
196-
Leave a team
201+
Convert templates back to sandboxes
197202
"""
198-
leaveTeam(teamId: ID!): String!
203+
unmakeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
199204

200205
"""
201-
Add a collaborator
206+
Unbookmark a template
202207
"""
203-
addCollaborator(
204-
authorization: Authorization!
205-
sandboxId: ID!
206-
username: String!
207-
): Collaborator!
208+
unbookmarkTemplate(teamId: ID, templateId: ID!): Template
208209

209210
"""
210-
Set the description of the team
211+
Delete a collection and all subfolders
211212
"""
212-
setTeamDescription(description: String!, teamId: ID!): Team!
213-
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!
213+
deleteCollection(path: String!, teamId: ID): [Collection!]!
214214

215215
"""
216-
Redeem an invite token from a team
216+
Leave a team
217217
"""
218-
redeemTeamInviteToken(inviteToken: String!): Team!
219-
revokeSandboxInvitation(invitationId: ID!, sandboxId: ID!): Invitation!
218+
leaveTeam(teamId: ID!): String!
220219

221220
"""
222-
Reject an invitation to a team
221+
Revoke an invitation to a team
223222
"""
224-
rejectTeamInvitation(teamId: ID!): String!
223+
revokeTeamInvitation(teamId: ID!, userId: ID!): Team!
224+
permanentlyDeleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
225225

226226
"""
227-
bookmark a template
227+
Change authorization of a collaborator
228228
"""
229-
bookmarkTemplate(teamId: ID, templateId: ID!): Template
229+
changeCollaboratorAuthorization(
230+
authorization: Authorization!
231+
sandboxId: ID!
232+
username: String!
233+
): Collaborator!
230234

231235
"""
232-
Delete a collection and all subfolders
236+
Reject an invitation to a team
233237
"""
234-
deleteCollection(path: String!, teamId: ID): [Collection!]!
235-
permanentlyDeleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
238+
rejectTeamInvitation(teamId: ID!): String!
236239

237240
"""
238-
Invite someone to a team
241+
Soft delete a comment. Note: all child comments will also be deleted.
239242
"""
240-
inviteToTeam(teamId: ID!, username: String!): Team!
243+
deleteComment(commentId: ID!, sandboxId: ID!): Comment!
241244

242245
"""
243246
Add sandboxes to a collection
@@ -247,88 +250,86 @@ type RootMutation {
247250
sandboxIds: [ID]!
248251
teamId: ID
249252
): Collection!
253+
createComment(
254+
codeReference: CodeReference
255+
content: String!
256+
id: ID
257+
parentCommentId: ID
258+
sandboxId: ID!
259+
): Comment!
260+
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!
261+
unresolveComment(commentId: ID!, sandboxId: ID!): Comment!
250262

251263
"""
252-
Rename a collection and all subfolders
264+
Remove a collaborator
253265
"""
254-
renameCollection(
255-
newPath: String!
256-
newTeamId: ID
257-
path: String!
258-
teamId: ID
259-
): [Collection!]!
266+
removeCollaborator(sandboxId: ID!, username: String!): Collaborator!
267+
268+
"""
269+
Set the description of the team
270+
"""
271+
setTeamDescription(description: String!, teamId: ID!): Team!
260272
renameSandbox(id: ID!, title: String!): Sandbox!
261-
changeSandboxInvitationAuthorization(
262-
authorization: Authorization!
263-
invitationId: ID!
264-
sandboxId: ID!
265-
): Invitation!
266-
unresolveComment(commentId: ID!, sandboxId: ID!): Comment!
267273

268274
"""
269-
Make templates from sandboxes
275+
Invite someone to a team
270276
"""
271-
makeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
277+
inviteToTeam(teamId: ID!, username: String!): Team!
272278

273279
"""
274-
Invite someone to a team via email
280+
Add a collaborator
275281
"""
276-
inviteToTeamViaEmail(email: String!, teamId: ID!): String!
277-
createSandboxInvitation(
282+
addCollaborator(
278283
authorization: Authorization!
279-
email: String!
280284
sandboxId: ID!
281-
): Invitation!
285+
username: String!
286+
): Collaborator!
282287

283288
"""
284-
Remove a collaborator
289+
Remove someone from a team
285290
"""
286-
removeCollaborator(sandboxId: ID!, username: String!): Collaborator!
287-
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID!]!): [Sandbox!]!
291+
removeFromTeam(teamId: ID!, userId: ID!): Team!
288292

289293
"""
290-
Create a collection
294+
Invite someone to a team via email
291295
"""
292-
createCollection(path: String!, teamId: ID): Collection!
293-
createComment(
294-
codeReference: CodeReference
295-
content: String!
296-
id: ID
297-
parentCommentId: ID
296+
inviteToTeamViaEmail(email: String!, teamId: ID!): String!
297+
changeSandboxInvitationAuthorization(
298+
authorization: Authorization!
299+
invitationId: ID!
298300
sandboxId: ID!
299-
): Comment!
301+
): Invitation!
300302
updateComment(commentId: ID!, content: String, sandboxId: ID!): Comment!
301303

302304
"""
303-
Convert templates back to sandboxes
305+
Clear notification unread count
304306
"""
305-
unmakeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
307+
clearNotificationCount: User
306308

307309
"""
308-
Soft delete a comment. Note: all child comments will also be deleted.
310+
Mark all notifications as read
309311
"""
310-
deleteComment(commentId: ID!, sandboxId: ID!): Comment!
312+
markAllNotificationsAsRead: User
311313

312314
"""
313-
Create a team
315+
bookmark a template
314316
"""
315-
createTeam(name: String!): Team!
317+
bookmarkTemplate(teamId: ID, templateId: ID!): Template
316318

317319
"""
318-
Delete sandboxes
320+
Redeem an invite token from a team
319321
"""
320-
deleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
322+
redeemTeamInviteToken(inviteToken: String!): Team!
321323

322324
"""
323-
Revoke an invitation to a team
325+
Create a collection
324326
"""
325-
revokeTeamInvitation(teamId: ID!, userId: ID!): Team!
327+
createCollection(path: String!, teamId: ID): Collection!
326328

327329
"""
328-
Mark all notifications as read
330+
Accept an invitation to a team
329331
"""
330-
markAllNotificationsAsRead: User
331-
resolveComment(commentId: ID!, sandboxId: ID!): Comment!
332+
acceptTeamInvitation(teamId: ID!): Team!
332333
}
333334

334335
type RootQuery {

0 commit comments

Comments
 (0)