Skip to content

Commit a354377

Browse files
update schema and comments handling
1 parent 04fde58 commit a354377

File tree

6 files changed

+251
-238
lines changed

6 files changed

+251
-238
lines changed

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

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# source: https://codesandbox.stream/api/graphql
2-
# timestamp: Tue Apr 14 2020 11:51:59 GMT+0200 (Central European Summer Time)
2+
# timestamp: Thu Apr 16 2020 12:44:25 GMT+0200 (Central European Summer Time)
33

44
schema {
55
query: RootQuery
@@ -30,6 +30,7 @@ input CodeReference {
3030
anchor: Int!
3131
code: String!
3232
head: Int!
33+
lastUpdatedAt: String!
3334
path: String!
3435
}
3536

@@ -39,7 +40,6 @@ type CodeReferenceMetadata {
3940
head: Int!
4041
path: String!
4142
sandboxId: String!
42-
sandboxVersion: Int!
4343
}
4444

4545
"""
@@ -164,126 +164,136 @@ union ReferenceMetadata = CodeReferenceMetadata
164164

165165
type RootMutation {
166166
"""
167-
Delete a collection and all subfolders
167+
Remove a collaborator
168168
"""
169-
deleteCollection(path: String!, teamId: ID): [Collection!]!
169+
removeCollaborator(sandboxId: ID!, username: String!): Collaborator!
170+
updateComment(commentId: ID!, content: String, sandboxId: ID!): Comment!
170171

171172
"""
172-
Create a collection
173+
Add sandboxes to a collection
173174
"""
174-
createCollection(path: String!, teamId: ID): Collection!
175-
revokeSandboxInvitation(invitationId: ID!, sandboxId: ID!): Invitation!
175+
addToCollection(
176+
collectionPath: String!
177+
sandboxIds: [ID]!
178+
teamId: ID
179+
): Collection!
180+
unresolveComment(commentId: ID!, sandboxId: ID!): Comment!
176181

177182
"""
178-
Create a team
183+
Reject an invitation to a team
179184
"""
180-
createTeam(name: String!): Team
185+
rejectTeamInvitation(teamId: ID!): String
186+
187+
"""
188+
Soft delete a comment. Note: all child comments will also be deleted.
189+
"""
190+
deleteComment(commentId: ID!, sandboxId: ID!): Comment!
191+
createSandboxInvitation(
192+
authorization: Authorization!
193+
email: String!
194+
sandboxId: ID!
195+
): Invitation!
181196

182197
"""
183198
Invite someone to a team
184199
"""
185200
inviteToTeam(teamId: ID!, username: String): Team
186201

187202
"""
188-
Accept an invitation to a team
203+
Rename a collection and all subfolders
189204
"""
190-
acceptTeamInvitation(teamId: ID!): Team
205+
renameCollection(
206+
newPath: String!
207+
newTeamId: ID
208+
path: String!
209+
teamId: ID
210+
): [Collection!]!
191211

192212
"""
193213
Make templates from sandboxes
194214
"""
195215
makeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
196-
unresolveComment(commentId: ID!, sandboxId: ID!): Comment!
216+
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!
197217

198218
"""
199-
Delete sandboxes
219+
Mark all notifications as read
200220
"""
201-
deleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
202-
createComment(
203-
codeReference: CodeReference
204-
content: String!
205-
id: ID
206-
parentCommentId: ID
207-
sandboxId: ID!
208-
): Comment!
221+
markAllNotificationsAsRead: User
209222

210223
"""
211-
Leave a team
224+
Set the description of the team
212225
"""
213-
leaveTeam(teamId: ID!): String
226+
setTeamDescription(description: String!, teamId: ID!): Team
214227

215228
"""
216-
Remove someone from a team
229+
Delete sandboxes
217230
"""
218-
removeFromTeam(teamId: ID!, userId: ID!): Team
231+
deleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
219232

220233
"""
221-
Set the description of the team
234+
Unbookmark a template
222235
"""
223-
setTeamDescription(description: String!, teamId: ID!): Team
224-
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!
236+
unbookmarkTemplate(teamId: ID, templateId: ID!): Template
237+
changeSandboxInvitationAuthorization(
238+
authorization: Authorization!
239+
invitationId: ID!
240+
sandboxId: ID!
241+
): Invitation!
225242

226243
"""
227-
Remove a collaborator
244+
Clear notification unread count
228245
"""
229-
removeCollaborator(sandboxId: ID!, username: String!): Collaborator!
246+
clearNotificationCount: User
247+
resolveComment(commentId: ID!, sandboxId: ID!): Comment!
230248

231249
"""
232-
Revoke an invitation to a team
250+
bookmark a template
233251
"""
234-
revokeTeamInvitation(teamId: ID!, userId: ID!): Team
252+
bookmarkTemplate(teamId: ID, templateId: ID!): Template
253+
permanentlyDeleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
235254

236255
"""
237-
Convert templates back to sandboxes
256+
Change authorization of a collaborator
238257
"""
239-
unmakeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
240-
createSandboxInvitation(
258+
changeCollaboratorAuthorization(
241259
authorization: Authorization!
242-
email: String!
243260
sandboxId: ID!
244-
): Invitation!
245-
246-
"""
247-
Unbookmark a template
248-
"""
249-
unbookmarkTemplate(teamId: ID, templateId: ID!): Template
261+
username: String!
262+
): Collaborator!
250263

251264
"""
252-
Add sandboxes to a collection
265+
Delete a collection and all subfolders
253266
"""
254-
addToCollection(
255-
collectionPath: String!
256-
sandboxIds: [ID]!
257-
teamId: ID
258-
): Collection!
259-
permanentlyDeleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
267+
deleteCollection(path: String!, teamId: ID): [Collection!]!
260268

261269
"""
262-
Rename a collection and all subfolders
270+
Convert templates back to sandboxes
263271
"""
264-
renameCollection(
265-
newPath: String!
266-
newTeamId: ID
267-
path: String!
268-
teamId: ID
269-
): [Collection!]!
272+
unmakeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
270273

271274
"""
272-
Reject an invitation to a team
275+
Create a collection
273276
"""
274-
rejectTeamInvitation(teamId: ID!): String
275-
resolveComment(commentId: ID!, sandboxId: ID!): Comment!
277+
createCollection(path: String!, teamId: ID): Collection!
278+
createComment(
279+
codeReference: CodeReference
280+
content: String!
281+
id: ID
282+
parentCommentId: ID
283+
sandboxId: ID!
284+
): Comment!
276285

277286
"""
278-
bookmark a template
287+
Revoke an invitation to a team
279288
"""
280-
bookmarkTemplate(teamId: ID, templateId: ID!): Template
289+
revokeTeamInvitation(teamId: ID!, userId: ID!): Team
290+
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID!]!): [Sandbox!]!
291+
renameSandbox(id: ID!, title: String!): Sandbox!
281292

282293
"""
283-
Clear notification unread count
294+
Accept an invitation to a team
284295
"""
285-
clearNotificationCount: User
286-
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID!]!): [Sandbox!]!
296+
acceptTeamInvitation(teamId: ID!): Team
287297

288298
"""
289299
Add a collaborator
@@ -293,32 +303,22 @@ type RootMutation {
293303
sandboxId: ID!
294304
username: String!
295305
): Collaborator!
296-
renameSandbox(id: ID!, title: String!): Sandbox!
297306

298307
"""
299-
Soft delete a comment. Note: all child comments will also be deleted.
308+
Leave a team
300309
"""
301-
deleteComment(commentId: ID!, sandboxId: ID!): Comment!
302-
updateComment(commentId: ID!, content: String, sandboxId: ID!): Comment!
303-
changeSandboxInvitationAuthorization(
304-
authorization: Authorization!
305-
invitationId: ID!
306-
sandboxId: ID!
307-
): Invitation!
310+
leaveTeam(teamId: ID!): String
308311

309312
"""
310-
Change authorization of a collaborator
313+
Remove someone from a team
311314
"""
312-
changeCollaboratorAuthorization(
313-
authorization: Authorization!
314-
sandboxId: ID!
315-
username: String!
316-
): Collaborator!
315+
removeFromTeam(teamId: ID!, userId: ID!): Team
317316

318317
"""
319-
Mark all notifications as read
318+
Create a team
320319
"""
321-
markAllNotificationsAsRead: User
320+
createTeam(name: String!): Team
321+
revokeSandboxInvitation(invitationId: ID!, sandboxId: ID!): Invitation!
322322
}
323323

324324
type RootQuery {

0 commit comments

Comments
 (0)