Skip to content

Commit f8919bf

Browse files
change createComment mutation (codesandbox#3795)
1 parent d34292d commit f8919bf

File tree

4 files changed

+223
-232
lines changed

4 files changed

+223
-232
lines changed

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

Lines changed: 80 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# source: https://codesandbox.stream/api/graphql
2-
# timestamp: Mon Mar 23 2020 21:19:15 GMT+0100 (Central European Standard Time)
2+
# timestamp: Mon Mar 30 2020 21:53:59 GMT+0200 (Central European Summer Time)
33

44
schema {
55
query: RootQuery
@@ -159,36 +159,42 @@ The metadata of a reference
159159
union ReferenceMetadata = CodeReferenceMetadata
160160

161161
type RootMutation {
162-
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!
162+
"""
163+
Set the description of the team
164+
"""
165+
setTeamDescription(description: String!, teamId: ID!): Team
163166

164167
"""
165-
Add sandboxes to a collection
168+
Unbookmark a template
166169
"""
167-
addToCollection(
168-
collectionPath: String!
169-
sandboxIds: [ID]!
170-
teamId: ID
171-
): Collection
170+
unbookmarkTemplate(teamId: ID, templateId: ID!): Template
172171

173172
"""
174-
Clear notification unread count
173+
Reject an invitation to a team
175174
"""
176-
clearNotificationCount: User
175+
rejectTeamInvitation(teamId: ID!): String
177176
revokeSandboxInvitation(invitationId: ID!, sandboxId: ID!): Invitation!
178177

179178
"""
180-
bookmark a template
179+
Remove someone from a team
181180
"""
182-
bookmarkTemplate(teamId: ID, templateId: ID!): Template
181+
removeFromTeam(teamId: ID!, userId: ID!): Team
183182

184183
"""
185-
Change authorization of a collaborator
184+
Delete a collection and all subfolders
186185
"""
187-
changeCollaboratorAuthorization(
186+
deleteCollection(path: String!, teamId: ID): [Collection]
187+
188+
"""
189+
Make templates from sandboxes
190+
"""
191+
makeSandboxesTemplates(sandboxIds: [ID]!): [Template]
192+
renameSandbox(id: ID!, title: String!): Sandbox
193+
createSandboxInvitation(
188194
authorization: Authorization!
195+
email: String!
189196
sandboxId: ID!
190-
username: String!
191-
): Collaborator!
197+
): Invitation!
192198

193199
"""
194200
Rename a collection and all subfolders
@@ -201,71 +207,71 @@ type RootMutation {
201207
): [Collection]
202208

203209
"""
204-
Create a team
205-
"""
206-
createTeam(name: String!): Team
207-
208-
"""
209-
Remove someone from a team
210+
Create a collection
210211
"""
211-
removeFromTeam(teamId: ID!, userId: ID!): Team
212+
createCollection(path: String!, teamId: ID): Collection
213+
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID]!): [Sandbox]
212214

213215
"""
214-
Accept an invitation to a team
216+
Add a collaborator
215217
"""
216-
acceptTeamInvitation(teamId: ID!): Team
218+
addCollaborator(
219+
authorization: Authorization!
220+
sandboxId: ID!
221+
username: String!
222+
): Collaborator!
223+
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!
217224

218225
"""
219-
Delete a comment. Note: all child comments will also be deleted.
226+
Convert templates back to sandboxes
220227
"""
221-
deleteComment(commentId: ID!, sandboxId: ID!): Comment!
228+
unmakeSandboxesTemplates(sandboxIds: [ID]!): [Template]
222229

223230
"""
224-
Remove a collaborator
231+
Clear notification unread count
225232
"""
226-
removeCollaborator(sandboxId: ID!, username: String!): Collaborator!
233+
clearNotificationCount: User
227234
changeSandboxInvitationAuthorization(
228235
authorization: Authorization!
229236
invitationId: ID!
230237
sandboxId: ID!
231238
): Invitation!
232-
createSandboxInvitation(
233-
authorization: Authorization!
234-
email: String!
235-
sandboxId: ID!
236-
): Invitation!
237-
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID]!): [Sandbox]
238-
createCodeComment(
239-
codeReference: CodeReference!
240-
content: String!
241-
sandboxId: ID!
242-
): Comment!
243-
createComment(content: String!, parentCommentId: ID, sandboxId: ID!): Comment!
244239

245240
"""
246-
Unbookmark a template
241+
Mark all notifications as read
247242
"""
248-
unbookmarkTemplate(teamId: ID, templateId: ID!): Template
243+
markAllNotificationsAsRead: User
249244

250245
"""
251-
Add a collaborator
246+
Add sandboxes to a collection
252247
"""
253-
addCollaborator(
254-
authorization: Authorization!
255-
sandboxId: ID!
256-
username: String!
257-
): Collaborator!
248+
addToCollection(
249+
collectionPath: String!
250+
sandboxIds: [ID]!
251+
teamId: ID
252+
): Collection
253+
254+
"""
255+
Accept an invitation to a team
256+
"""
257+
acceptTeamInvitation(teamId: ID!): Team
258258
permanentlyDeleteSandboxes(sandboxIds: [ID]!): [Sandbox]
259259

260260
"""
261-
Reject an invitation to a team
261+
Create a team
262262
"""
263-
rejectTeamInvitation(teamId: ID!): String
263+
createTeam(name: String!): Team
264264

265265
"""
266-
Convert templates back to sandboxes
266+
Invite someone to a team
267267
"""
268-
unmakeSandboxesTemplates(sandboxIds: [ID]!): [Template]
268+
inviteToTeam(teamId: ID!, username: String): Team
269+
createComment(
270+
codeReference: CodeReference
271+
content: String!
272+
parentCommentId: ID
273+
sandboxId: ID!
274+
): Comment!
269275
updateComment(
270276
commentId: ID!
271277
content: String
@@ -274,45 +280,43 @@ type RootMutation {
274280
): Comment!
275281

276282
"""
277-
Make templates from sandboxes
278-
"""
279-
makeSandboxesTemplates(sandboxIds: [ID]!): [Template]
280-
281-
"""
282-
Invite someone to a team
283+
Revoke an invitation to a team
283284
"""
284-
inviteToTeam(teamId: ID!, username: String): Team
285+
revokeTeamInvitation(teamId: ID!, userId: ID!): Team
285286

286287
"""
287-
Leave a team
288+
Delete sandboxes
288289
"""
289-
leaveTeam(teamId: ID!): String
290+
deleteSandboxes(sandboxIds: [ID]!): [Sandbox]
290291

291292
"""
292-
Delete sandboxes
293+
Change authorization of a collaborator
293294
"""
294-
deleteSandboxes(sandboxIds: [ID]!): [Sandbox]
295+
changeCollaboratorAuthorization(
296+
authorization: Authorization!
297+
sandboxId: ID!
298+
username: String!
299+
): Collaborator!
295300

296301
"""
297-
Revoke an invitation to a team
302+
bookmark a template
298303
"""
299-
revokeTeamInvitation(teamId: ID!, userId: ID!): Team
304+
bookmarkTemplate(teamId: ID, templateId: ID!): Template
300305

301306
"""
302-
Set the description of the team
307+
Leave a team
303308
"""
304-
setTeamDescription(description: String!, teamId: ID!): Team
309+
leaveTeam(teamId: ID!): String
305310

306311
"""
307-
Create a collection
312+
Remove a collaborator
308313
"""
309-
createCollection(path: String!, teamId: ID): Collection
310-
renameSandbox(id: ID!, title: String!): Sandbox
314+
removeCollaborator(sandboxId: ID!, username: String!): Collaborator!
311315

312316
"""
313-
Delete a collection and all subfolders
317+
Delete a comment. Note: all child comments will also be deleted.
314318
"""
315-
deleteCollection(path: String!, teamId: ID): [Collection]
319+
deleteComment(commentId: ID!, sandboxId: ID!): Comment!
316320
}
317321

318322
type RootQuery {
@@ -331,6 +335,9 @@ type RootSubscriptionType {
331335
collaboratorAdded(sandboxId: ID!): Collaborator!
332336
collaboratorChanged(sandboxId: ID!): Collaborator!
333337
collaboratorRemoved(sandboxId: ID!): Collaborator!
338+
commentAdded(sandboxId: ID!): Comment!
339+
commentChanged(sandboxId: ID!): Comment!
340+
commentRemoved(sandboxId: ID!): Comment!
334341
invitationChanged(sandboxId: ID!): Invitation!
335342
invitationCreated(sandboxId: ID!): Invitation!
336343
invitationRemoved(sandboxId: ID!): Invitation!

0 commit comments

Comments
 (0)