diff options
author | Michael Muré <batolettre@gmail.com> | 2024-08-28 11:43:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 09:43:42 +0000 |
commit | 57e7147021e38b847213d4dc7f0e0bf0b022850d (patch) | |
tree | 882650697950003e2325f0815353032a8596ca1d /api/graphql/schema/bug_mutations.graphql | |
parent | e45c3c5ee6dc5650fd8c3f480d9e09e5f3b221fd (diff) | |
download | git-bug-57e7147021e38b847213d4dc7f0e0bf0b022850d.tar.gz |
graphql: properly namespace Bug to make space for other entities (#1254)
Also: use gqlgen directives to help the type auto-binding
Missing:
- namespace mutations
- adapt the webUI queries
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! +} |