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_operations.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_operations.graphql')
-rw-r--r-- | api/graphql/schema/bug_operations.graphql | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/api/graphql/schema/bug_operations.graphql b/api/graphql/schema/bug_operations.graphql new file mode 100644 index 00000000..93228d2a --- /dev/null +++ b/api/graphql/schema/bug_operations.graphql @@ -0,0 +1,78 @@ +type BugCreateOperation implements Operation & Authored +@goModel(model: "github.com/git-bug/git-bug/entities/bug.CreateOperation") { + """The identifier of the operation""" + id: ID! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! @goField(name: "Time") + + title: String! + message: String! + files: [Hash!]! +} + +type BugSetTitleOperation implements Operation & Authored +@goModel(model: "github.com/git-bug/git-bug/entities/bug.SetTitleOperation") { + """The identifier of the operation""" + id: ID! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! @goField(name: "Time") + + title: String! + was: String! +} + +type BugAddCommentOperation implements Operation & Authored +@goModel(model: "github.com/git-bug/git-bug/entities/bug.AddCommentOperation") { + """The identifier of the operation""" + id: ID! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! @goField(name: "Time") + + message: String! + files: [Hash!]! +} + +type BugEditCommentOperation implements Operation & Authored +@goModel(model: "github.com/git-bug/git-bug/entities/bug.EditCommentOperation") { + """The identifier of the operation""" + id: ID! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! @goField(name: "Time") + + target: String! + message: String! + files: [Hash!]! +} + +type BugSetStatusOperation implements Operation & Authored +@goModel(model: "github.com/git-bug/git-bug/entities/bug.SetStatusOperation") { + """The identifier of the operation""" + id: ID! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! @goField(name: "Time") + + status: Status! +} + +type BugLabelChangeOperation implements Operation & Authored +@goModel(model: "github.com/git-bug/git-bug/entities/bug.LabelChangeOperation") { + """The identifier of the operation""" + id: ID! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! @goField(name: "Time") + + added: [Label!]! + removed: [Label!]! +} |