Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 91 additions & 86 deletions packages/app/src/app/graphql/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# source: http://server:4000/api/graphql
# timestamp: Mon Apr 27 2020 13:17:23 GMT+0000 (Coordinated Universal Time)
# source: https://codesandbox.io/api/graphql
# timestamp: Tue Apr 28 2020 12:51:15 GMT+0200 (Central European Summer Time)

schema {
query: RootQuery
Expand Down Expand Up @@ -163,109 +163,90 @@ The metadata of a reference
union ReferenceMetadata = CodeReferenceMetadata

type RootMutation {
"""
Remove a collaborator
"""
removeCollaborator(sandboxId: ID!, username: String!): Collaborator!
createComment(
codeReference: CodeReference
content: String!
id: ID
parentCommentId: ID
sandboxId: ID!
): Comment!

"""
Clear notification unread count
"""
clearNotificationCount: User

"""
Add sandboxes to a collection
"""
addToCollection(
collectionPath: String!
sandboxIds: [ID]!
teamId: ID
): Collection!

"""
Set the description of the team
Remove someone from a team
"""
setTeamDescription(description: String!, teamId: ID!): Team
removeFromTeam(teamId: ID!, userId: ID!): Team!

"""
Create a team
Unbookmark a template
"""
createTeam(name: String!): Team
unbookmarkTemplate(teamId: ID, templateId: ID!): Template

"""
Revoke an invitation to a team
Accept an invitation to a team
"""
revokeTeamInvitation(teamId: ID!, userId: ID!): Team
acceptTeamInvitation(teamId: ID!): Team!

"""
Unbookmark a template
Change authorization of a collaborator
"""
unbookmarkTemplate(teamId: ID, templateId: ID!): Template
changeCollaboratorAuthorization(
authorization: Authorization!
sandboxId: ID!
username: String!
): Collaborator!

"""
Invite someone to a team
Leave a team
"""
inviteToTeam(email: String, teamId: ID!, username: String): Team
unresolveComment(commentId: ID!, sandboxId: ID!): Comment!
leaveTeam(teamId: ID!): String!

"""
Delete a collection and all subfolders
Add a collaborator
"""
deleteCollection(path: String!, teamId: ID): [Collection!]!
addCollaborator(
authorization: Authorization!
sandboxId: ID!
username: String!
): Collaborator!

"""
Make templates from sandboxes
Set the description of the team
"""
makeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
setTeamDescription(description: String!, teamId: ID!): Team!
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!

"""
Accept an invitation to a team
Redeem an invite token from a team
"""
acceptTeamInvitation(teamId: ID!): Team
redeemTeamInviteToken(inviteToken: String!): Team!
revokeSandboxInvitation(invitationId: ID!, sandboxId: ID!): Invitation!

"""
Redeem an invite token from a team
Reject an invitation to a team
"""
redeemTeamInviteToken(inviteToken: String!): Team
rejectTeamInvitation(teamId: ID!): String!

"""
Delete sandboxes
bookmark a template
"""
deleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID!]!): [Sandbox!]!
createSandboxInvitation(
authorization: Authorization!
email: String!
sandboxId: ID!
): Invitation!
bookmarkTemplate(teamId: ID, templateId: ID!): Template

"""
Add a collaborator
Delete a collection and all subfolders
"""
addCollaborator(
authorization: Authorization!
sandboxId: ID!
username: String!
): Collaborator!
renameSandbox(id: ID!, title: String!): Sandbox!
deleteCollection(path: String!, teamId: ID): [Collection!]!
permanentlyDeleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!

"""
Convert templates back to sandboxes
Invite someone to a team
"""
unmakeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!
inviteToTeam(teamId: ID!, username: String!): Team!

"""
Reject an invitation to a team
Add sandboxes to a collection
"""
rejectTeamInvitation(teamId: ID!): String
permanentlyDeleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!
addToCollection(
collectionPath: String!
sandboxIds: [ID]!
teamId: ID
): Collection!

"""
Rename a collection and all subfolders
Expand All @@ -276,54 +257,78 @@ type RootMutation {
path: String!
teamId: ID
): [Collection!]!
renameSandbox(id: ID!, title: String!): Sandbox!
changeSandboxInvitationAuthorization(
authorization: Authorization!
invitationId: ID!
sandboxId: ID!
): Invitation!
unresolveComment(commentId: ID!, sandboxId: ID!): Comment!

"""
bookmark a template
Make templates from sandboxes
"""
bookmarkTemplate(teamId: ID, templateId: ID!): Template
revokeSandboxInvitation(invitationId: ID!, sandboxId: ID!): Invitation!
makeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!

"""
Invite someone to a team via email
"""
inviteToTeamViaEmail(email: String!, teamId: ID!): String!
createSandboxInvitation(
authorization: Authorization!
email: String!
sandboxId: ID!
): Invitation!

"""
Remove a collaborator
"""
removeCollaborator(sandboxId: ID!, username: String!): Collaborator!
setSandboxesPrivacy(privacy: Int, sandboxIds: [ID!]!): [Sandbox!]!

"""
Create a collection
"""
createCollection(path: String!, teamId: ID): Collection!
createComment(
codeReference: CodeReference
content: String!
id: ID
parentCommentId: ID
sandboxId: ID!
): Comment!
updateComment(commentId: ID!, content: String, sandboxId: ID!): Comment!

"""
Mark all notifications as read
Convert templates back to sandboxes
"""
markAllNotificationsAsRead: User
redeemSandboxInvitation(invitationToken: String!, sandboxId: ID!): Invitation!
unmakeSandboxesTemplates(sandboxIds: [ID!]!): [Template!]!

"""
Soft delete a comment. Note: all child comments will also be deleted.
"""
deleteComment(commentId: ID!, sandboxId: ID!): Comment!
resolveComment(commentId: ID!, sandboxId: ID!): Comment!
changeSandboxInvitationAuthorization(
authorization: Authorization!
invitationId: ID!
sandboxId: ID!
): Invitation!
updateComment(commentId: ID!, content: String, sandboxId: ID!): Comment!

"""
Leave a team
Create a team
"""
leaveTeam(teamId: ID!): String
createTeam(name: String!): Team!

"""
Remove someone from a team
Delete sandboxes
"""
removeFromTeam(teamId: ID!, userId: ID!): Team
deleteSandboxes(sandboxIds: [ID!]!): [Sandbox!]!

"""
Change authorization of a collaborator
Revoke an invitation to a team
"""
changeCollaboratorAuthorization(
authorization: Authorization!
sandboxId: ID!
username: String!
): Collaborator!
revokeTeamInvitation(teamId: ID!, userId: ID!): Team!

"""
Mark all notifications as read
"""
markAllNotificationsAsRead: User
resolveComment(commentId: ID!, sandboxId: ID!): Comment!
}

type RootQuery {
Expand All @@ -340,7 +345,7 @@ type RootQuery {
"""
A team from an invite token
"""
teamByToken(inviteToken: ID!): Team
teamByToken(inviteToken: String!): Team
}

type RootSubscriptionType {
Expand Down
Loading