diff options
author | Michael Muré <batolettre@gmail.com> | 2021-05-24 09:43:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-24 09:43:37 +0200 |
commit | cda3037c7cd053d5521f7928ae6c5e2801dc42d7 (patch) | |
tree | fe28abae16a509e4b92b3bd063df6a9200660123 /api/graphql/schema | |
parent | 13d9632fb888dde9962e122ef06614ca9e9da83d (diff) | |
parent | 4043f5da0965bca1ffc717c1ceca265ec8b9ae17 (diff) | |
download | git-bug-cda3037c7cd053d5521f7928ae6c5e2801dc42d7.tar.gz |
Merge pull request #665 from GlancingMind/Implement-CommentAndCloseMutation
GraphQL: Implement AddCommentAndCloseBug mutation
Diffstat (limited to 'api/graphql/schema')
-rw-r--r-- | api/graphql/schema/mutations.graphql | 40 | ||||
-rw-r--r-- | api/graphql/schema/root.graphql | 2 |
2 files changed, 34 insertions, 8 deletions
diff --git a/api/graphql/schema/mutations.graphql b/api/graphql/schema/mutations.graphql index d7adde1e..36222e6b 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 884fd98d..4b4e0e2f 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""" |