From 4043f5da0965bca1ffc717c1ceca265ec8b9ae17 Mon Sep 17 00:00:00 2001 From: Sascha Date: Wed, 5 May 2021 17:18:31 +0200 Subject: GraphQL: Add AddCommandAndCloseBug mutation --- api/graphql/schema/mutations.graphql | 40 ++++++++++++++++++++++++++++-------- api/graphql/schema/root.graphql | 2 ++ 2 files changed, 34 insertions(+), 8 deletions(-) (limited to 'api/graphql/schema') diff --git a/api/graphql/schema/mutations.graphql b/api/graphql/schema/mutations.graphql index d7adde1e7..36222e6bc 100644 --- a/api/graphql/schema/mutations.graphql +++ b/api/graphql/schema/mutations.graphql @@ -1,7 +1,7 @@ input NewBugInput { """A unique identifier for the client performing the mutation.""" clientMutationId: String - """"The name of the repository. If not set, the default repository is used.""" + """The name of the repository. If not set, the default repository is used.""" repoRef: String """The title of the new bug.""" title: String! @@ -23,11 +23,11 @@ type NewBugPayload { input AddCommentInput { """A unique identifier for the client performing the mutation.""" clientMutationId: String - """"The name of the repository. If not set, the default repository is used.""" + """The name of the repository. If not set, the default repository is used.""" repoRef: String """The bug ID's prefix.""" prefix: String! - """The first message of the new bug.""" + """The message to be added to the bug.""" message: String! """The collection of file's hash required for the first message.""" files: [Hash!] @@ -42,10 +42,34 @@ type AddCommentPayload { operation: AddCommentOperation! } +input AddCommentAndCloseBugInput { + """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 AddCommentAndCloseBugPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + """The affected bug.""" + bug: Bug! + """The resulting AddComment operation.""" + commentOperation: AddCommentOperation! + """The resulting SetStatusOperation.""" + statusOperation: SetStatusOperation! +} + input EditCommentInput { """A unique identifier for the client performing the mutation.""" clientMutationId: String - """"The name of the repository. If not set, the default repository is used.""" + """The name of the repository. If not set, the default repository is used.""" repoRef: String """The bug ID's prefix.""" prefix: String! @@ -69,7 +93,7 @@ type EditCommentPayload { input ChangeLabelInput { """A unique identifier for the client performing the mutation.""" clientMutationId: String - """"The name of the repository. If not set, the default repository is used.""" + """The name of the repository. If not set, the default repository is used.""" repoRef: String """The bug ID's prefix.""" prefix: String! @@ -108,7 +132,7 @@ type ChangeLabelPayload { input OpenBugInput { """A unique identifier for the client performing the mutation.""" clientMutationId: String - """"The name of the repository. If not set, the default repository is used.""" + """The name of the repository. If not set, the default repository is used.""" repoRef: String """The bug ID's prefix.""" prefix: String! @@ -126,7 +150,7 @@ type OpenBugPayload { input CloseBugInput { """A unique identifier for the client performing the mutation.""" clientMutationId: String - """"The name of the repository. If not set, the default repository is used.""" + """The name of the repository. If not set, the default repository is used.""" repoRef: String """The bug ID's prefix.""" prefix: String! @@ -144,7 +168,7 @@ type CloseBugPayload { input SetTitleInput { """A unique identifier for the client performing the mutation.""" clientMutationId: String - """"The name of the repository. If not set, the default repository is used.""" + """The name of the repository. If not set, the default repository is used.""" repoRef: String """The bug ID's prefix.""" prefix: String! diff --git a/api/graphql/schema/root.graphql b/api/graphql/schema/root.graphql index 884fd98db..4b4e0e2ff 100644 --- a/api/graphql/schema/root.graphql +++ b/api/graphql/schema/root.graphql @@ -8,6 +8,8 @@ type Mutation { newBug(input: NewBugInput!): NewBugPayload! """Add a new comment to a bug""" addComment(input: AddCommentInput!): AddCommentPayload! + """Add a new comment to a bug and close it""" + addCommentAndClose(input: AddCommentAndCloseBugInput!): AddCommentAndCloseBugPayload! """Change a comment of a bug""" editComment(input: EditCommentInput!): EditCommentPayload! """Add or remove a set of label on a bug""" -- cgit v1.2.3