diff options
Diffstat (limited to 'api/graphql/schema/bug_mutations.graphql')
-rw-r--r-- | api/graphql/schema/bug_mutations.graphql | 214 |
1 files changed, 214 insertions, 0 deletions
diff --git a/api/graphql/schema/bug_mutations.graphql b/api/graphql/schema/bug_mutations.graphql new file mode 100644 index 00000000..c67ad707 --- /dev/null +++ b/api/graphql/schema/bug_mutations.graphql @@ -0,0 +1,214 @@ +extend type Mutation { + """Create a new bug""" + bugCreate(input: BugCreateInput!): BugCreatePayload! + """Add a new comment to a bug""" + bugAddComment(input: BugAddCommentInput!): BugAddCommentPayload! + """Add a new comment to a bug and close it""" + bugAddCommentAndClose(input: BugAddCommentAndCloseInput!): BugAddCommentAndClosePayload! + """Add a new comment to a bug and reopen it""" + bugAddCommentAndReopen(input: BugAddCommentAndReopenInput!): BugAddCommentAndReopenPayload! + """Change a comment of a bug""" + bugEditComment(input: BugEditCommentInput!): BugEditCommentPayload! + """Add or remove a set of label on a bug""" + bugChangeLabels(input: BugChangeLabelInput): BugChangeLabelPayload! + """Change a bug's status to open""" + bugStatusOpen(input: BugStatusOpenInput!): BugStatusOpenPayload! + """Change a bug's status to closed""" + bugStatusClose(input: BugStatusCloseInput!): BugStatusClosePayload! + """Change a bug's title""" + bugSetTitle(input: BugSetTitleInput!): BugSetTitlePayload! +} + +input BugCreateInput { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The name of the repository. If not set, the default repository is used.""" + repoRef: String + """The title of the new bug.""" + title: String! + """The first message of the new bug.""" + message: String! + """The collection of file's hash required for the first message.""" + files: [Hash!] +} + +type BugCreatePayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The created bug.""" + bug: Bug! + """The resulting operation.""" + operation: BugCreateOperation! +} + +input BugAddCommentInput { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The name of the repository. If not set, the default repository is used.""" + repoRef: String + """The bug ID's prefix.""" + prefix: String! + """The message to be added to the bug.""" + message: String! + """The collection of file's hash required for the first message.""" + files: [Hash!] +} + +type BugAddCommentPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The affected bug.""" + bug: Bug! + """The resulting operation.""" + operation: BugAddCommentOperation! +} + +input BugAddCommentAndCloseInput { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The name of the repository. If not set, the default repository is used.""" + repoRef: String + """The bug ID's prefix.""" + prefix: String! + """The message to be added to the bug.""" + message: String! + """The collection of file's hash required for the first message.""" + files: [Hash!] +} + +type BugAddCommentAndClosePayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The affected bug.""" + bug: Bug! + """The resulting AddComment operation.""" + commentOperation: BugAddCommentOperation! + """The resulting SetStatusOperation.""" + statusOperation: BugSetStatusOperation! +} + +input BugAddCommentAndReopenInput { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The name of the repository. If not set, the default repository is used.""" + repoRef: String + """The bug ID's prefix.""" + prefix: String! + """The message to be added to the bug.""" + message: String! + """The collection of file's hash required for the first message.""" + files: [Hash!] +} + +type BugAddCommentAndReopenPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The affected bug.""" + bug: Bug! + """The resulting AddComment operation.""" + commentOperation: BugAddCommentOperation! + """The resulting SetStatusOperation.""" + statusOperation: BugSetStatusOperation! +} + +input BugEditCommentInput { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The name of the repository. If not set, the default repository is used.""" + repoRef: String + """A prefix of the CombinedId of the comment to be changed.""" + targetPrefix: String! + """The new message to be set.""" + message: String! + """The collection of file's hash required for the first message.""" + files: [Hash!] +} + +type BugEditCommentPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The affected bug.""" + bug: Bug! + """The resulting operation.""" + operation: BugEditCommentOperation! +} + +input BugChangeLabelInput { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The name of the repository. If not set, the default repository is used.""" + repoRef: String + """The bug ID's prefix.""" + prefix: String! + """The list of label to add.""" + added: [String!] + """The list of label to remove.""" + Removed: [String!] +} + +type BugChangeLabelPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The affected bug.""" + bug: Bug! + """The resulting operation.""" + operation: BugLabelChangeOperation! + """The effect each source label had.""" + results: [LabelChangeResult]! +} + +input BugStatusOpenInput { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The name of the repository. If not set, the default repository is used.""" + repoRef: String + """The bug ID's prefix.""" + prefix: String! +} + +type BugStatusOpenPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The affected bug.""" + bug: Bug! + """The resulting operation.""" + operation: BugSetStatusOperation! +} + +input BugStatusCloseInput { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The name of the repository. If not set, the default repository is used.""" + repoRef: String + """The bug ID's prefix.""" + prefix: String! +} + +type BugStatusClosePayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The affected bug.""" + bug: Bug! + """The resulting operation.""" + operation: BugSetStatusOperation! +} + +input BugSetTitleInput { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The name of the repository. If not set, the default repository is used.""" + repoRef: String + """The bug ID's prefix.""" + prefix: String! + """The new title.""" + title: String! +} + +type BugSetTitlePayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The affected bug.""" + bug: Bug! + """The resulting operation""" + operation: BugSetTitleOperation! +} |