aboutsummaryrefslogtreecommitdiffstats
path: root/api/graphql/models/gen_models.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2024-08-28 11:43:42 +0200
committerGitHub <noreply@github.com>2024-08-28 09:43:42 +0000
commit57e7147021e38b847213d4dc7f0e0bf0b022850d (patch)
tree882650697950003e2325f0815353032a8596ca1d /api/graphql/models/gen_models.go
parente45c3c5ee6dc5650fd8c3f480d9e09e5f3b221fd (diff)
downloadgit-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/models/gen_models.go')
-rw-r--r--api/graphql/models/gen_models.go224
1 files changed, 112 insertions, 112 deletions
diff --git a/api/graphql/models/gen_models.go b/api/graphql/models/gen_models.go
index a09b36b4..36c68c0e 100644
--- a/api/graphql/models/gen_models.go
+++ b/api/graphql/models/gen_models.go
@@ -14,7 +14,7 @@ type Authored interface {
IsAuthored()
}
-type AddCommentAndCloseBugInput struct {
+type BugAddCommentAndCloseInput struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The name of the repository. If not set, the default repository is used.
@@ -27,7 +27,7 @@ type AddCommentAndCloseBugInput struct {
Files []repository.Hash `json:"files,omitempty"`
}
-type AddCommentAndCloseBugPayload struct {
+type BugAddCommentAndClosePayload struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The affected bug.
@@ -38,7 +38,7 @@ type AddCommentAndCloseBugPayload struct {
StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
}
-type AddCommentAndReopenBugInput struct {
+type BugAddCommentAndReopenInput struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The name of the repository. If not set, the default repository is used.
@@ -51,7 +51,7 @@ type AddCommentAndReopenBugInput struct {
Files []repository.Hash `json:"files,omitempty"`
}
-type AddCommentAndReopenBugPayload struct {
+type BugAddCommentAndReopenPayload struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The affected bug.
@@ -62,7 +62,7 @@ type AddCommentAndReopenBugPayload struct {
StatusOperation *bug.SetStatusOperation `json:"statusOperation"`
}
-type AddCommentInput struct {
+type BugAddCommentInput struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The name of the repository. If not set, the default repository is used.
@@ -75,7 +75,7 @@ type AddCommentInput struct {
Files []repository.Hash `json:"files,omitempty"`
}
-type AddCommentPayload struct {
+type BugAddCommentPayload struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The affected bug.
@@ -84,6 +84,42 @@ type AddCommentPayload struct {
Operation *bug.AddCommentOperation `json:"operation"`
}
+type BugChangeLabelInput struct {
+ // A unique identifier for the client performing the mutation.
+ ClientMutationID *string `json:"clientMutationId,omitempty"`
+ // The name of the repository. If not set, the default repository is used.
+ RepoRef *string `json:"repoRef,omitempty"`
+ // The bug ID's prefix.
+ Prefix string `json:"prefix"`
+ // The list of label to add.
+ Added []string `json:"added,omitempty"`
+ // The list of label to remove.
+ Removed []string `json:"Removed,omitempty"`
+}
+
+type BugChangeLabelPayload struct {
+ // A unique identifier for the client performing the mutation.
+ ClientMutationID *string `json:"clientMutationId,omitempty"`
+ // The affected bug.
+ Bug BugWrapper `json:"bug"`
+ // The resulting operation.
+ Operation *bug.LabelChangeOperation `json:"operation"`
+ // The effect each source label had.
+ Results []*bug.LabelChangeResult `json:"results"`
+}
+
+type BugCommentConnection struct {
+ Edges []*BugCommentEdge `json:"edges"`
+ Nodes []*bug.Comment `json:"nodes"`
+ PageInfo *PageInfo `json:"pageInfo"`
+ TotalCount int `json:"totalCount"`
+}
+
+type BugCommentEdge struct {
+ Cursor string `json:"cursor"`
+ Node *bug.Comment `json:"node"`
+}
+
// The connection type for Bug.
type BugConnection struct {
// A list of edges.
@@ -95,6 +131,28 @@ type BugConnection struct {
TotalCount int `json:"totalCount"`
}
+type BugCreateInput struct {
+ // A unique identifier for the client performing the mutation.
+ ClientMutationID *string `json:"clientMutationId,omitempty"`
+ // The name of the repository. If not set, the default repository is used.
+ RepoRef *string `json:"repoRef,omitempty"`
+ // The title of the new bug.
+ Title string `json:"title"`
+ // The first message of the new bug.
+ Message string `json:"message"`
+ // The collection of file's hash required for the first message.
+ Files []repository.Hash `json:"files,omitempty"`
+}
+
+type BugCreatePayload struct {
+ // A unique identifier for the client performing the mutation.
+ ClientMutationID *string `json:"clientMutationId,omitempty"`
+ // The created bug.
+ Bug BugWrapper `json:"bug"`
+ // The resulting operation.
+ Operation *bug.CreateOperation `json:"operation"`
+}
+
// An edge in a connection.
type BugEdge struct {
// A cursor for use in pagination.
@@ -103,80 +161,96 @@ type BugEdge struct {
Node BugWrapper `json:"node"`
}
-type ChangeLabelInput struct {
+type BugEditCommentInput struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The name of the repository. If not set, the default repository is used.
RepoRef *string `json:"repoRef,omitempty"`
- // The bug ID's prefix.
- Prefix string `json:"prefix"`
- // The list of label to add.
- Added []string `json:"added,omitempty"`
- // The list of label to remove.
- Removed []string `json:"Removed,omitempty"`
+ // A prefix of the CombinedId of the comment to be changed.
+ TargetPrefix string `json:"targetPrefix"`
+ // The new message to be set.
+ Message string `json:"message"`
+ // The collection of file's hash required for the first message.
+ Files []repository.Hash `json:"files,omitempty"`
}
-type ChangeLabelPayload struct {
+type BugEditCommentPayload struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The affected bug.
Bug BugWrapper `json:"bug"`
// The resulting operation.
- Operation *bug.LabelChangeOperation `json:"operation"`
- // The effect each source label had.
- Results []*bug.LabelChangeResult `json:"results"`
+ Operation *bug.EditCommentOperation `json:"operation"`
}
-type CloseBugInput struct {
+type BugSetTitleInput struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The name of the repository. If not set, the default repository is used.
RepoRef *string `json:"repoRef,omitempty"`
// The bug ID's prefix.
Prefix string `json:"prefix"`
+ // The new title.
+ Title string `json:"title"`
}
-type CloseBugPayload struct {
+type BugSetTitlePayload struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The affected bug.
Bug BugWrapper `json:"bug"`
- // The resulting operation.
- Operation *bug.SetStatusOperation `json:"operation"`
+ // The resulting operation
+ Operation *bug.SetTitleOperation `json:"operation"`
}
-type CommentConnection struct {
- Edges []*CommentEdge `json:"edges"`
- Nodes []*bug.Comment `json:"nodes"`
- PageInfo *PageInfo `json:"pageInfo"`
- TotalCount int `json:"totalCount"`
+type BugStatusCloseInput struct {
+ // A unique identifier for the client performing the mutation.
+ ClientMutationID *string `json:"clientMutationId,omitempty"`
+ // The name of the repository. If not set, the default repository is used.
+ RepoRef *string `json:"repoRef,omitempty"`
+ // The bug ID's prefix.
+ Prefix string `json:"prefix"`
}
-type CommentEdge struct {
- Cursor string `json:"cursor"`
- Node *bug.Comment `json:"node"`
+type BugStatusClosePayload struct {
+ // A unique identifier for the client performing the mutation.
+ ClientMutationID *string `json:"clientMutationId,omitempty"`
+ // The affected bug.
+ Bug BugWrapper `json:"bug"`
+ // The resulting operation.
+ Operation *bug.SetStatusOperation `json:"operation"`
}
-type EditCommentInput struct {
+type BugStatusOpenInput struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The name of the repository. If not set, the default repository is used.
RepoRef *string `json:"repoRef,omitempty"`
- // A prefix of the CombinedId of the comment to be changed.
- TargetPrefix string `json:"targetPrefix"`
- // The new message to be set.
- Message string `json:"message"`
- // The collection of file's hash required for the first message.
- Files []repository.Hash `json:"files,omitempty"`
+ // The bug ID's prefix.
+ Prefix string `json:"prefix"`
}
-type EditCommentPayload struct {
+type BugStatusOpenPayload struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
// The affected bug.
Bug BugWrapper `json:"bug"`
// The resulting operation.
- Operation *bug.EditCommentOperation `json:"operation"`
+ Operation *bug.SetStatusOperation `json:"operation"`
+}
+
+// The connection type for TimelineItem
+type BugTimelineItemConnection struct {
+ Edges []*BugTimelineItemEdge `json:"edges"`
+ Nodes []bug.TimelineItem `json:"nodes"`
+ PageInfo *PageInfo `json:"pageInfo"`
+ TotalCount int `json:"totalCount"`
+}
+
+// Represent a TimelineItem
+type BugTimelineItemEdge struct {
+ Cursor string `json:"cursor"`
+ Node bug.TimelineItem `json:"node"`
}
type IdentityConnection struct {
@@ -206,46 +280,6 @@ type LabelEdge struct {
type Mutation struct {
}
-type NewBugInput struct {
- // A unique identifier for the client performing the mutation.
- ClientMutationID *string `json:"clientMutationId,omitempty"`
- // The name of the repository. If not set, the default repository is used.
- RepoRef *string `json:"repoRef,omitempty"`
- // The title of the new bug.
- Title string `json:"title"`
- // The first message of the new bug.
- Message string `json:"message"`
- // The collection of file's hash required for the first message.
- Files []repository.Hash `json:"files,omitempty"`
-}
-
-type NewBugPayload struct {
- // A unique identifier for the client performing the mutation.
- ClientMutationID *string `json:"clientMutationId,omitempty"`
- // The created bug.
- Bug BugWrapper `json:"bug"`
- // The resulting operation.
- Operation *bug.CreateOperation `json:"operation"`
-}
-
-type OpenBugInput struct {
- // A unique identifier for the client performing the mutation.
- ClientMutationID *string `json:"clientMutationId,omitempty"`
- // The name of the repository. If not set, the default repository is used.
- RepoRef *string `json:"repoRef,omitempty"`
- // The bug ID's prefix.
- Prefix string `json:"prefix"`
-}
-
-type OpenBugPayload struct {
- // A unique identifier for the client performing the mutation.
- ClientMutationID *string `json:"clientMutationId,omitempty"`
- // The affected bug.
- Bug BugWrapper `json:"bug"`
- // The resulting operation.
- Operation *bug.SetStatusOperation `json:"operation"`
-}
-
// The connection type for an Operation
type OperationConnection struct {
Edges []*OperationEdge `json:"edges"`
@@ -274,37 +308,3 @@ type PageInfo struct {
type Query struct {
}
-
-type SetTitleInput struct {
- // A unique identifier for the client performing the mutation.
- ClientMutationID *string `json:"clientMutationId,omitempty"`
- // The name of the repository. If not set, the default repository is used.
- RepoRef *string `json:"repoRef,omitempty"`
- // The bug ID's prefix.
- Prefix string `json:"prefix"`
- // The new title.
- Title string `json:"title"`
-}
-
-type SetTitlePayload struct {
- // A unique identifier for the client performing the mutation.
- ClientMutationID *string `json:"clientMutationId,omitempty"`
- // The affected bug.
- Bug BugWrapper `json:"bug"`
- // The resulting operation
- Operation *bug.SetTitleOperation `json:"operation"`
-}
-
-// The connection type for TimelineItem
-type TimelineItemConnection struct {
- Edges []*TimelineItemEdge `json:"edges"`
- Nodes []bug.TimelineItem `json:"nodes"`
- PageInfo *PageInfo `json:"pageInfo"`
- TotalCount int `json:"totalCount"`
-}
-
-// Represent a TimelineItem
-type TimelineItemEdge struct {
- Cursor string `json:"cursor"`
- Node bug.TimelineItem `json:"node"`
-}