aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/go.yml4
-rw-r--r--api/graphql/connections/connections.go2
-rw-r--r--api/graphql/connections/gen_operation.go12
-rw-r--r--api/graphql/gen_graphql.go2
-rw-r--r--api/graphql/gqlgen.yml2
-rw-r--r--api/graphql/graph/gen_graph.go8787
-rw-r--r--api/graphql/models/gen_models.go5
-rw-r--r--api/graphql/models/lazy_bug.go7
-rw-r--r--api/graphql/resolvers/bug.go5
-rw-r--r--bridge/github/export.go3
-rw-r--r--bridge/github/export_test.go4
-rw-r--r--bridge/github/import_test.go19
-rw-r--r--bridge/gitlab/export.go3
-rw-r--r--bridge/gitlab/export_test.go7
-rw-r--r--bridge/gitlab/import_test.go9
-rw-r--r--bridge/jira/export.go3
-rw-r--r--bridge/jira/import.go3
-rw-r--r--bug/bug.go16
-rw-r--r--bug/comment.go2
-rw-r--r--bug/interface.go29
-rw-r--r--bug/op_add_comment.go68
-rw-r--r--bug/op_add_comment_test.go33
-rw-r--r--bug/op_create.go103
-rw-r--r--bug/op_create_test.go30
-rw-r--r--bug/op_edit_comment.go70
-rw-r--r--bug/op_edit_comment_test.go30
-rw-r--r--bug/op_label_change.go81
-rw-r--r--bug/op_label_change_test.go37
-rw-r--r--bug/op_noop.go77
-rw-r--r--bug/op_noop_test.go39
-rw-r--r--bug/op_set_metadata.go105
-rw-r--r--bug/op_set_metadata_test.go126
-rw-r--r--bug/op_set_status.go61
-rw-r--r--bug/op_set_status_test.go31
-rw-r--r--bug/op_set_title.go64
-rw-r--r--bug/op_set_title_test.go31
-rw-r--r--bug/operation.go240
-rw-r--r--bug/operation_test.go11
-rw-r--r--bug/snapshot.go11
-rw-r--r--bug/with_snapshot.go9
-rw-r--r--cache/bug_cache.go105
-rw-r--r--cache/repo_cache.go6
-rw-r--r--cache/repo_cache_bug.go6
-rw-r--r--cache/repo_cache_common.go4
-rw-r--r--entity/dag/common_test.go77
-rw-r--r--entity/dag/entity.go2
-rw-r--r--entity/dag/entity_test.go2
-rw-r--r--entity/dag/example_test.go142
-rw-r--r--entity/dag/op_noop.go39
-rw-r--r--entity/dag/op_noop_test.go13
-rw-r--r--entity/dag/op_set_metadata.go68
-rw-r--r--entity/dag/op_set_metadata_test.go106
-rw-r--r--entity/dag/operation.go232
-rw-r--r--entity/dag/operation_pack.go7
-rw-r--r--entity/dag/operation_pack_test.go62
-rw-r--r--entity/dag/operation_testing.go57
-rw-r--r--go.mod78
-rw-r--r--go.sum51
-rw-r--r--misc/random_bugs/create_random_bugs.go11
-rw-r--r--repository/gogit.go2
-rw-r--r--repository/repo.go4
-rw-r--r--webui/debug_assets.go2
-rw-r--r--webui/pack_webui.go2
-rw-r--r--webui/packed_assets.go2
64 files changed, 7007 insertions, 4254 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 27353e90..7846a1d6 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
- go-version: [1.16.x]
+ go-version: [1.18.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
@@ -46,7 +46,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
- go-version: 1.16.x
+ go-version: 1.18.x
- name: Checkout code
uses: actions/checkout@v2
diff --git a/api/graphql/connections/connections.go b/api/graphql/connections/connections.go
index 0083f8b2..bfdf8909 100644
--- a/api/graphql/connections/connections.go
+++ b/api/graphql/connections/connections.go
@@ -1,7 +1,7 @@
//go:generate genny -in=connection_template.go -out=gen_lazy_bug.go gen "Name=LazyBug NodeType=entity.Id EdgeType=LazyBugEdge ConnectionType=models.BugConnection"
//go:generate genny -in=connection_template.go -out=gen_lazy_identity.go gen "Name=LazyIdentity NodeType=entity.Id EdgeType=LazyIdentityEdge ConnectionType=models.IdentityConnection"
//go:generate genny -in=connection_template.go -out=gen_identity.go gen "Name=Identity NodeType=models.IdentityWrapper EdgeType=models.IdentityEdge ConnectionType=models.IdentityConnection"
-//go:generate genny -in=connection_template.go -out=gen_operation.go gen "Name=Operation NodeType=bug.Operation EdgeType=models.OperationEdge ConnectionType=models.OperationConnection"
+//go:generate genny -in=connection_template.go -out=gen_operation.go gen "Name=Operation NodeType=dag.Operation EdgeType=models.OperationEdge ConnectionType=models.OperationConnection"
//go:generate genny -in=connection_template.go -out=gen_comment.go gen "Name=Comment NodeType=bug.Comment EdgeType=models.CommentEdge ConnectionType=models.CommentConnection"
//go:generate genny -in=connection_template.go -out=gen_timeline.go gen "Name=TimelineItem NodeType=bug.TimelineItem EdgeType=models.TimelineItemEdge ConnectionType=models.TimelineItemConnection"
//go:generate genny -in=connection_template.go -out=gen_label.go gen "Name=Label NodeType=bug.Label EdgeType=models.LabelEdge ConnectionType=models.LabelConnection"
diff --git a/api/graphql/connections/gen_operation.go b/api/graphql/connections/gen_operation.go
index 4bd84895..848cebd6 100644
--- a/api/graphql/connections/gen_operation.go
+++ b/api/graphql/connections/gen_operation.go
@@ -8,23 +8,23 @@ import (
"fmt"
"github.com/MichaelMure/git-bug/api/graphql/models"
- "github.com/MichaelMure/git-bug/bug"
+ "github.com/MichaelMure/git-bug/entity/dag"
)
-// BugOperationEdgeMaker define a function that take a bug.Operation and an offset and
+// DagOperationEdgeMaker define a function that take a dag.Operation and an offset and
// create an Edge.
-type OperationEdgeMaker func(value bug.Operation, offset int) Edge
+type OperationEdgeMaker func(value dag.Operation, offset int) Edge
// OperationConMaker define a function that create a models.OperationConnection
type OperationConMaker func(
edges []*models.OperationEdge,
- nodes []bug.Operation,
+ nodes []dag.Operation,
info *models.PageInfo,
totalCount int) (*models.OperationConnection, error)
// OperationCon will paginate a source according to the input of a relay connection
-func OperationCon(source []bug.Operation, edgeMaker OperationEdgeMaker, conMaker OperationConMaker, input models.ConnectionInput) (*models.OperationConnection, error) {
- var nodes []bug.Operation
+func OperationCon(source []dag.Operation, edgeMaker OperationEdgeMaker, conMaker OperationConMaker, input models.ConnectionInput) (*models.OperationConnection, error) {
+ var nodes []dag.Operation
var edges []*models.OperationEdge
var cursors []string
var pageInfo = &models.PageInfo{}
diff --git a/api/graphql/gen_graphql.go b/api/graphql/gen_graphql.go
index 47f2c458..19c5f1e3 100644
--- a/api/graphql/gen_graphql.go
+++ b/api/graphql/gen_graphql.go
@@ -1,4 +1,4 @@
-// +build ignore
+//go:build ignore
package main
diff --git a/api/graphql/gqlgen.yml b/api/graphql/gqlgen.yml
index b8019076..fb3399f3 100644
--- a/api/graphql/gqlgen.yml
+++ b/api/graphql/gqlgen.yml
@@ -33,7 +33,7 @@ models:
Hash:
model: github.com/MichaelMure/git-bug/repository.Hash
Operation:
- model: github.com/MichaelMure/git-bug/bug.Operation
+ model: github.com/MichaelMure/git-bug/entity/dag.Operation
CreateOperation:
model: github.com/MichaelMure/git-bug/bug.CreateOperation
SetTitleOperation:
diff --git a/api/graphql/graph/gen_graph.go b/api/graphql/graph/gen_graph.go
index 468635f6..fe951f61 100644
--- a/api/graphql/graph/gen_graph.go
+++ b/api/graphql/graph/gen_graph.go
@@ -17,6 +17,7 @@ import (
"github.com/99designs/gqlgen/graphql/introspection"
"github.com/MichaelMure/git-bug/api/graphql/models"
"github.com/MichaelMure/git-bug/bug"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/repository"
gqlparser "github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
@@ -1902,6 +1903,17 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
rc := graphql.GetOperationContext(ctx)
ec := executionContext{rc, e}
+ inputUnmarshalMap := graphql.BuildUnmarshalerMap(
+ ec.unmarshalInputAddCommentAndCloseBugInput,
+ ec.unmarshalInputAddCommentAndReopenBugInput,
+ ec.unmarshalInputAddCommentInput,
+ ec.unmarshalInputChangeLabelInput,
+ ec.unmarshalInputCloseBugInput,
+ ec.unmarshalInputEditCommentInput,
+ ec.unmarshalInputNewBugInput,
+ ec.unmarshalInputOpenBugInput,
+ ec.unmarshalInputSetTitleInput,
+ )
first := true
switch rc.Operation.Operation {
@@ -1911,6 +1923,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
return nil
}
first = false
+ ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
data := ec._Query(ctx, rc.Operation.SelectionSet)
var buf bytes.Buffer
data.MarshalGQL(&buf)
@@ -1925,6 +1938,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
return nil
}
first = false
+ ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
data := ec._Mutation(ctx, rc.Operation.SelectionSet)
var buf bytes.Buffer
data.MarshalGQL(&buf)
@@ -1959,7 +1973,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er
}
var sources = []*ast.Source{
- {Name: "schema/bug.graphql", Input: `"""Represents a comment on a bug."""
+ {Name: "../schema/bug.graphql", Input: `"""Represents a comment on a bug."""
type Comment implements Authored {
"""The author of this comment."""
author: Identity!
@@ -2078,7 +2092,7 @@ type BugEdge {
node: Bug!
}
`, BuiltIn: false},
- {Name: "schema/identity.graphql", Input: `"""Represents an identity"""
+ {Name: "../schema/identity.graphql", Input: `"""Represents an identity"""
type Identity {
"""The identifier for this identity"""
id: String!
@@ -2110,7 +2124,7 @@ type IdentityEdge {
cursor: String!
node: Identity!
}`, BuiltIn: false},
- {Name: "schema/label.graphql", Input: `"""Label for a bug."""
+ {Name: "../schema/label.graphql", Input: `"""Label for a bug."""
type Label {
"""The name of the label."""
name: String!
@@ -2129,7 +2143,7 @@ type LabelEdge {
cursor: String!
node: Label!
}`, BuiltIn: false},
- {Name: "schema/mutations.graphql", Input: `input NewBugInput {
+ {Name: "../schema/mutations.graphql", Input: `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."""
@@ -2340,7 +2354,7 @@ type SetTitlePayload {
operation: SetTitleOperation!
}
`, BuiltIn: false},
- {Name: "schema/operations.graphql", Input: `"""An operation applied to a bug."""
+ {Name: "../schema/operations.graphql", Input: `"""An operation applied to a bug."""
interface Operation {
"""The identifier of the operation"""
id: String!
@@ -2441,7 +2455,7 @@ type LabelChangeOperation implements Operation & Authored {
removed: [Label!]!
}
`, BuiltIn: false},
- {Name: "schema/repository.graphql", Input: `
+ {Name: "../schema/repository.graphql", Input: `
type Repository {
"""The name of the repository"""
name: String
@@ -2492,7 +2506,7 @@ type Repository {
): LabelConnection!
}
`, BuiltIn: false},
- {Name: "schema/root.graphql", Input: `type Query {
+ {Name: "../schema/root.graphql", Input: `type Query {
"""Access a repository by reference/name. If no ref is given, the default repository is returned if any."""
repository(ref: String): Repository
}
@@ -2518,7 +2532,7 @@ type Mutation {
setTitle(input: SetTitleInput!): SetTitlePayload!
}
`, BuiltIn: false},
- {Name: "schema/timeline.graphql", Input: `"""An item in the timeline of events"""
+ {Name: "../schema/timeline.graphql", Input: `"""An item in the timeline of events"""
interface TimelineItem {
"""The identifier of the source operation"""
id: String!
@@ -2605,7 +2619,7 @@ type SetTitleTimelineItem implements TimelineItem & Authored {
was: String!
}
`, BuiltIn: false},
- {Name: "schema/types.graphql", Input: `scalar Time
+ {Name: "../schema/types.graphql", Input: `scalar Time
scalar Hash
"""Defines a color by red, green and blue components."""
@@ -3222,21 +3236,17 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg
// region **************************** field.gotpl *****************************
func (ec *executionContext) _AddCommentAndCloseBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndCloseBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentAndCloseBugPayload_clientMutationId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentAndCloseBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
@@ -3253,22 +3263,31 @@ func (ec *executionContext) _AddCommentAndCloseBugPayload_clientMutationId(ctx c
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentAndCloseBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndCloseBugPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AddCommentAndCloseBugPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AddCommentAndCloseBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndCloseBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentAndCloseBugPayload_bug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
@@ -3288,22 +3307,59 @@ func (ec *executionContext) _AddCommentAndCloseBugPayload_bug(ctx context.Contex
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentAndCloseBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentAndCloseBugPayload_commentOperation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndCloseBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentAndCloseBugPayload_commentOperation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentAndCloseBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.CommentOperation, nil
@@ -3323,22 +3379,43 @@ func (ec *executionContext) _AddCommentAndCloseBugPayload_commentOperation(ctx c
return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐAddCommentOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentAndCloseBugPayload_statusOperation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndCloseBugPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_commentOperation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AddCommentAndCloseBugPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_AddCommentOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_AddCommentOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_AddCommentOperation_date(ctx, field)
+ case "message":
+ return ec.fieldContext_AddCommentOperation_message(ctx, field)
+ case "files":
+ return ec.fieldContext_AddCommentOperation_files(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type AddCommentOperation", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AddCommentAndCloseBugPayload_statusOperation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndCloseBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentAndCloseBugPayload_statusOperation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.StatusOperation, nil
@@ -3358,22 +3435,41 @@ func (ec *executionContext) _AddCommentAndCloseBugPayload_statusOperation(ctx co
return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetStatusOperation(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_statusOperation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentAndCloseBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_SetStatusOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_SetStatusOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_SetStatusOperation_date(ctx, field)
+ case "status":
+ return ec.fieldContext_SetStatusOperation_status(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SetStatusOperation", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentAndReopenBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndReopenBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentAndReopenBugPayload_clientMutationId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentAndReopenBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
@@ -3390,22 +3486,31 @@ func (ec *executionContext) _AddCommentAndReopenBugPayload_clientMutationId(ctx
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentAndReopenBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndReopenBugPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AddCommentAndReopenBugPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AddCommentAndReopenBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndReopenBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentAndReopenBugPayload_bug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
@@ -3425,22 +3530,59 @@ func (ec *executionContext) _AddCommentAndReopenBugPayload_bug(ctx context.Conte
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentAndReopenBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentAndReopenBugPayload_commentOperation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndReopenBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentAndReopenBugPayload_commentOperation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentAndReopenBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.CommentOperation, nil
@@ -3460,22 +3602,43 @@ func (ec *executionContext) _AddCommentAndReopenBugPayload_commentOperation(ctx
return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐAddCommentOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentAndReopenBugPayload_statusOperation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndReopenBugPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_commentOperation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AddCommentAndReopenBugPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_AddCommentOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_AddCommentOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_AddCommentOperation_date(ctx, field)
+ case "message":
+ return ec.fieldContext_AddCommentOperation_message(ctx, field)
+ case "files":
+ return ec.fieldContext_AddCommentOperation_files(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type AddCommentOperation", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AddCommentAndReopenBugPayload_statusOperation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentAndReopenBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentAndReopenBugPayload_statusOperation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.StatusOperation, nil
@@ -3495,22 +3658,41 @@ func (ec *executionContext) _AddCommentAndReopenBugPayload_statusOperation(ctx c
return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetStatusOperation(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_statusOperation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentAndReopenBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_SetStatusOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_SetStatusOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_SetStatusOperation_date(ctx, field)
+ case "status":
+ return ec.fieldContext_SetStatusOperation_status(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SetStatusOperation", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentOperation_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentOperation().ID(rctx, obj)
@@ -3530,22 +3712,31 @@ func (ec *executionContext) _AddCommentOperation_id(ctx context.Context, field g
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AddCommentOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AddCommentOperation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentOperation_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentOperation().Author(rctx, obj)
@@ -3565,22 +3756,49 @@ func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, fie
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentOperation_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentOperation().Date(rctx, obj)
@@ -3600,22 +3818,31 @@ func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentOperation_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentOperation",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
@@ -3635,22 +3862,31 @@ func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, fi
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AddCommentOperation_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AddCommentOperation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentOperation_files(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
@@ -3670,22 +3906,31 @@ func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, fiel
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentOperation_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentOperation",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Hash does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentPayload_clientMutationId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
@@ -3702,22 +3947,31 @@ func (ec *executionContext) _AddCommentPayload_clientMutationId(ctx context.Cont
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AddCommentPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AddCommentPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AddCommentPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentPayload_bug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
@@ -3737,22 +3991,59 @@ func (ec *executionContext) _AddCommentPayload_bug(ctx context.Context, field gr
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentPayload_operation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
@@ -3772,22 +4063,43 @@ func (ec *executionContext) _AddCommentPayload_operation(ctx context.Context, fi
return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐAddCommentOperation(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_AddCommentOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_AddCommentOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_AddCommentOperation_date(ctx, field)
+ case "message":
+ return ec.fieldContext_AddCommentOperation_message(ctx, field)
+ case "files":
+ return ec.fieldContext_AddCommentOperation_files(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type AddCommentOperation", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentTimelineItem_id(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentTimelineItem_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentTimelineItem().ID(rctx, obj)
@@ -3807,22 +4119,31 @@ func (ec *executionContext) _AddCommentTimelineItem_id(ctx context.Context, fiel
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AddCommentTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AddCommentTimelineItem",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentTimelineItem_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentTimelineItem().Author(rctx, obj)
@@ -3842,22 +4163,49 @@ func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context,
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentTimelineItem_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
@@ -3877,22 +4225,31 @@ func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context,
return ec.marshalNString2string(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentTimelineItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentTimelineItem_messageIsEmpty(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MessageIsEmpty(), nil
@@ -3912,22 +4269,31 @@ func (ec *executionContext) _AddCommentTimelineItem_messageIsEmpty(ctx context.C
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentTimelineItem_files(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
@@ -3947,22 +4313,31 @@ func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, f
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentTimelineItem_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentTimelineItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Hash does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentTimelineItem_createdAt(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentTimelineItem().CreatedAt(rctx, obj)
@@ -3982,22 +4357,31 @@ func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Contex
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "AddCommentTimelineItem",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentTimelineItem_lastEdit(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentTimelineItem().LastEdit(rctx, obj)
@@ -4017,22 +4401,31 @@ func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentTimelineItem_edited(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edited(), nil
@@ -4052,22 +4445,31 @@ func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context,
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_AddCommentTimelineItem_history(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "AddCommentTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.History, nil
@@ -4087,22 +4489,37 @@ func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context,
return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentHistoryStepᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_AddCommentTimelineItem_history(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "AddCommentTimelineItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "message":
+ return ec.fieldContext_CommentHistoryStep_message(ctx, field)
+ case "date":
+ return ec.fieldContext_CommentHistoryStep_date(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CommentHistoryStep", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Bug",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().ID(rctx, obj)
@@ -4122,22 +4539,31 @@ func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.Collected
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_humanId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().HumanID(rctx, obj)
@@ -4157,22 +4583,31 @@ func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.Coll
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_humanId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().Status(rctx, obj)
@@ -4192,22 +4627,31 @@ func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.Colle
return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_Bug_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Bug",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Status does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_title(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Bug",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Title(), nil
@@ -4227,22 +4671,31 @@ func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.Collec
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_labels(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Labels(), nil
@@ -4262,22 +4715,37 @@ func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.Colle
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Label_name(ctx, field)
+ case "color":
+ return ec.fieldContext_Label_color(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author()
@@ -4297,22 +4765,49 @@ func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.Colle
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_Bug_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Bug",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_createdAt(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Bug",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt(), nil
@@ -4332,22 +4827,31 @@ func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.Co
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_lastEdit(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.LastEdit(), nil
@@ -4367,32 +4871,34 @@ func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.Col
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_lastEdit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
- IsResolver: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Bug_actors_args(ctx, rawArgs)
+func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_actors(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Bug().Actors(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
+ return ec.resolvers.Bug().Actors(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -4409,32 +4915,55 @@ func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.Colle
return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_actors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "edges":
+ return ec.fieldContext_IdentityConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_IdentityConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_IdentityConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_IdentityConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type IdentityConnection", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Bug_participants_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Bug_actors_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_participants(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Bug().Participants(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
+ return ec.resolvers.Bug().Participants(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -4451,32 +4980,55 @@ func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql
return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_participants(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "edges":
+ return ec.fieldContext_IdentityConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_IdentityConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_IdentityConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_IdentityConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type IdentityConnection", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Bug_comments_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Bug_participants_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_comments(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Bug().Comments(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
+ return ec.resolvers.Bug().Comments(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -4493,32 +5045,55 @@ func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.Col
return ec.marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_comments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "edges":
+ return ec.fieldContext_CommentConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_CommentConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_CommentConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_CommentConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CommentConnection", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Bug_timeline_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Bug_comments_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_timeline(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Bug().Timeline(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
+ return ec.resolvers.Bug().Timeline(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -4535,32 +5110,55 @@ func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.Col
return ec.marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Bug_timeline(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Bug",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "edges":
+ return ec.fieldContext_TimelineItemConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_TimelineItemConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_TimelineItemConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_TimelineItemConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TimelineItemConnection", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Bug_operations_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Bug_timeline_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Bug_operations(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Bug().Operations(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
+ return ec.resolvers.Bug().Operations(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -4577,22 +5175,52 @@ func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.C
return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Bug_operations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Bug",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "edges":
+ return ec.fieldContext_OperationConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_OperationConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_OperationConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_OperationConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type OperationConnection", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "BugConnection",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Bug_operations_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BugConnection_edges(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
@@ -4612,22 +5240,37 @@ func (ec *executionContext) _BugConnection_edges(ctx context.Context, field grap
return ec.marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BugConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BugConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "cursor":
+ return ec.fieldContext_BugEdge_cursor(ctx, field)
+ case "node":
+ return ec.fieldContext_BugEdge_node(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BugEdge", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BugConnection_nodes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
@@ -4647,22 +5290,59 @@ func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field grap
return ec.marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_BugConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BugConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BugConnection_pageInfo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "BugConnection",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
@@ -4682,22 +5362,41 @@ func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field g
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BugConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "hasNextPage":
+ return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
+ case "hasPreviousPage":
+ return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
+ case "startCursor":
+ return ec.fieldContext_PageInfo_startCursor(ctx, field)
+ case "endCursor":
+ return ec.fieldContext_PageInfo_endCursor(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BugConnection_totalCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
@@ -4717,22 +5416,31 @@ func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field
return ec.marshalNInt2int(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_BugConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BugConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BugEdge_cursor(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "BugEdge",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
@@ -4752,22 +5460,31 @@ func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.C
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_BugEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "BugEdge",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BugEdge_node(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
@@ -4787,22 +5504,59 @@ func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.Col
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_BugEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BugEdge",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _ChangeLabelPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ChangeLabelPayload_clientMutationId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ChangeLabelPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
@@ -4819,22 +5573,31 @@ func (ec *executionContext) _ChangeLabelPayload_clientMutationId(ctx context.Con
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ChangeLabelPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_ChangeLabelPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "ChangeLabelPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ChangeLabelPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ChangeLabelPayload_bug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
@@ -4854,22 +5617,59 @@ func (ec *executionContext) _ChangeLabelPayload_bug(ctx context.Context, field g
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_ChangeLabelPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ChangeLabelPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _ChangeLabelPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ChangeLabelPayload_operation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "ChangeLabelPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
@@ -4889,22 +5689,43 @@ func (ec *executionContext) _ChangeLabelPayload_operation(ctx context.Context, f
return ec.marshalNLabelChangeOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelChangeOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _ChangeLabelPayload_results(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_ChangeLabelPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "ChangeLabelPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_LabelChangeOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_LabelChangeOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_LabelChangeOperation_date(ctx, field)
+ case "added":
+ return ec.fieldContext_LabelChangeOperation_added(ctx, field)
+ case "removed":
+ return ec.fieldContext_LabelChangeOperation_removed(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LabelChangeOperation", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _ChangeLabelPayload_results(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ChangeLabelPayload_results(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Results, nil
@@ -4924,22 +5745,37 @@ func (ec *executionContext) _ChangeLabelPayload_results(ctx context.Context, fie
return ec.marshalNLabelChangeResult2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelChangeResult(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_ChangeLabelPayload_results(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ChangeLabelPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "label":
+ return ec.fieldContext_LabelChangeResult_label(ctx, field)
+ case "status":
+ return ec.fieldContext_LabelChangeResult_status(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LabelChangeResult", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CloseBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CloseBugPayload_clientMutationId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CloseBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
@@ -4956,22 +5792,31 @@ func (ec *executionContext) _CloseBugPayload_clientMutationId(ctx context.Contex
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CloseBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CloseBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CloseBugPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CloseBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CloseBugPayload_bug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
@@ -4991,22 +5836,59 @@ func (ec *executionContext) _CloseBugPayload_bug(ctx context.Context, field grap
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CloseBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CloseBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CloseBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CloseBugPayload_operation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CloseBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
@@ -5026,22 +5908,41 @@ func (ec *executionContext) _CloseBugPayload_operation(ctx context.Context, fiel
return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetStatusOperation(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CloseBugPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CloseBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_SetStatusOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_SetStatusOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_SetStatusOperation_date(ctx, field)
+ case "status":
+ return ec.fieldContext_SetStatusOperation_status(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SetStatusOperation", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Color_R(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Color_R(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Color",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Color().R(rctx, obj)
@@ -5061,22 +5962,31 @@ func (ec *executionContext) _Color_R(ctx context.Context, field graphql.Collecte
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Color_G(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Color_R(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Color",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Color_G(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Color_G(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Color().G(rctx, obj)
@@ -5096,22 +6006,31 @@ func (ec *executionContext) _Color_G(ctx context.Context, field graphql.Collecte
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Color_B(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Color_G(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Color",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Color_B(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Color_B(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Color().B(rctx, obj)
@@ -5131,22 +6050,31 @@ func (ec *executionContext) _Color_B(ctx context.Context, field graphql.Collecte
return ec.marshalNInt2int(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_Color_B(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Color",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Comment_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Comment",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Comment().Author(rctx, obj)
@@ -5166,22 +6094,49 @@ func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.C
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_Comment_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Comment",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Comment_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Comment",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
@@ -5201,22 +6156,31 @@ func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Comment_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Comment",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Comment_files(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
@@ -5236,22 +6200,31 @@ func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.Co
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_Comment_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Comment",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Hash does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommentConnection_edges(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CommentConnection",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
@@ -5271,22 +6244,37 @@ func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field
return ec.marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommentConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommentConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "cursor":
+ return ec.fieldContext_CommentEdge_cursor(ctx, field)
+ case "node":
+ return ec.fieldContext_CommentEdge_node(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CommentEdge", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommentConnection_nodes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
@@ -5306,22 +6294,39 @@ func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field
return ec.marshalNComment2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommentConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommentConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "author":
+ return ec.fieldContext_Comment_author(ctx, field)
+ case "message":
+ return ec.fieldContext_Comment_message(ctx, field)
+ case "files":
+ return ec.fieldContext_Comment_files(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommentConnection_pageInfo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
@@ -5341,22 +6346,41 @@ func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, fie
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommentConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "hasNextPage":
+ return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
+ case "hasPreviousPage":
+ return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
+ case "startCursor":
+ return ec.fieldContext_PageInfo_startCursor(ctx, field)
+ case "endCursor":
+ return ec.fieldContext_PageInfo_endCursor(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommentConnection_totalCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
@@ -5376,22 +6400,31 @@ func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, f
return ec.marshalNInt2int(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CommentConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommentEdge_cursor(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CommentEdge",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
@@ -5411,22 +6444,31 @@ func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graph
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CommentEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CommentEdge",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommentEdge_node(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
@@ -5446,22 +6488,39 @@ func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql
return ec.marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐComment(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CommentEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CommentEdge",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "author":
+ return ec.fieldContext_Comment_author(ctx, field)
+ case "message":
+ return ec.fieldContext_Comment_message(ctx, field)
+ case "files":
+ return ec.fieldContext_Comment_files(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Comment", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommentHistoryStep_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CommentHistoryStep",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
@@ -5481,22 +6540,31 @@ func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CommentHistoryStep",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CommentHistoryStep_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CommentHistoryStep",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CommentHistoryStep().Date(rctx, obj)
@@ -5516,22 +6584,31 @@ func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CommentHistoryStep_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CommentHistoryStep",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateOperation_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateOperation().ID(rctx, obj)
@@ -5551,22 +6628,31 @@ func (ec *executionContext) _CreateOperation_id(ctx context.Context, field graph
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CreateOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CreateOperation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateOperation_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateOperation().Author(rctx, obj)
@@ -5586,22 +6672,49 @@ func (ec *executionContext) _CreateOperation_author(ctx context.Context, field g
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateOperation_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateOperation().Date(rctx, obj)
@@ -5621,22 +6734,31 @@ func (ec *executionContext) _CreateOperation_date(ctx context.Context, field gra
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateOperation_title(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateOperation",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Title, nil
@@ -5656,22 +6778,31 @@ func (ec *executionContext) _CreateOperation_title(ctx context.Context, field gr
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CreateOperation_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CreateOperation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateOperation_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
@@ -5691,22 +6822,31 @@ func (ec *executionContext) _CreateOperation_message(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CreateOperation_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CreateOperation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CreateOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateOperation_files(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
@@ -5726,22 +6866,31 @@ func (ec *executionContext) _CreateOperation_files(ctx context.Context, field gr
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateOperation_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateOperation",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Hash does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateTimelineItem_id(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateTimelineItem_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateTimelineItem().ID(rctx, obj)
@@ -5761,22 +6910,31 @@ func (ec *executionContext) _CreateTimelineItem_id(ctx context.Context, field gr
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CreateTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CreateTimelineItem",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateTimelineItem_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateTimelineItem().Author(rctx, obj)
@@ -5796,22 +6954,49 @@ func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, fiel
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateTimelineItem_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
@@ -5831,22 +7016,31 @@ func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateTimelineItem_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateTimelineItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateTimelineItem_messageIsEmpty(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MessageIsEmpty(), nil
@@ -5866,22 +7060,31 @@ func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Conte
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateTimelineItem_files(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
@@ -5901,22 +7104,31 @@ func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateTimelineItem_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateTimelineItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Hash does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateTimelineItem_createdAt(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateTimelineItem().CreatedAt(rctx, obj)
@@ -5936,22 +7148,31 @@ func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, f
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_CreateTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "CreateTimelineItem",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateTimelineItem_lastEdit(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateTimelineItem().LastEdit(rctx, obj)
@@ -5971,22 +7192,31 @@ func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, fi
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateTimelineItem_edited(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edited(), nil
@@ -6006,22 +7236,31 @@ func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, fiel
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateTimelineItem_edited(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_CreateTimelineItem_history(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "CreateTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.History, nil
@@ -6041,22 +7280,37 @@ func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, fie
return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentHistoryStepᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_CreateTimelineItem_history(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "CreateTimelineItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "message":
+ return ec.fieldContext_CommentHistoryStep_message(ctx, field)
+ case "date":
+ return ec.fieldContext_CommentHistoryStep_date(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CommentHistoryStep", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _EditCommentOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_EditCommentOperation_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "EditCommentOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.EditCommentOperation().ID(rctx, obj)
@@ -6076,22 +7330,31 @@ func (ec *executionContext) _EditCommentOperation_id(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_EditCommentOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "EditCommentOperation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_EditCommentOperation_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.EditCommentOperation().Author(rctx, obj)
@@ -6111,22 +7374,49 @@ func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, fi
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_EditCommentOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "EditCommentOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_EditCommentOperation_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "EditCommentOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.EditCommentOperation().Date(rctx, obj)
@@ -6146,22 +7436,31 @@ func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, fiel
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_EditCommentOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "EditCommentOperation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_EditCommentOperation_target(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.EditCommentOperation().Target(rctx, obj)
@@ -6181,22 +7480,31 @@ func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, fi
return ec.marshalNString2string(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_EditCommentOperation_target(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "EditCommentOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_EditCommentOperation_message(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "EditCommentOperation",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
@@ -6216,22 +7524,31 @@ func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, f
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_EditCommentOperation_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "EditCommentOperation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_EditCommentOperation_files(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
@@ -6251,22 +7568,31 @@ func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, fie
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_EditCommentOperation_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "EditCommentOperation",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Hash does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _EditCommentPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.EditCommentPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_EditCommentPayload_clientMutationId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "EditCommentPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
@@ -6283,22 +7609,31 @@ func (ec *executionContext) _EditCommentPayload_clientMutationId(ctx context.Con
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.EditCommentPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_EditCommentPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "EditCommentPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _EditCommentPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.EditCommentPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_EditCommentPayload_bug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
@@ -6318,22 +7653,59 @@ func (ec *executionContext) _EditCommentPayload_bug(ctx context.Context, field g
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_EditCommentPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "EditCommentPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _EditCommentPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.EditCommentPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_EditCommentPayload_operation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "EditCommentPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
@@ -6353,22 +7725,45 @@ func (ec *executionContext) _EditCommentPayload_operation(ctx context.Context, f
return ec.marshalNEditCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐEditCommentOperation(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_EditCommentPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "EditCommentPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_EditCommentOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_EditCommentOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_EditCommentOperation_date(ctx, field)
+ case "target":
+ return ec.fieldContext_EditCommentOperation_target(ctx, field)
+ case "message":
+ return ec.fieldContext_EditCommentOperation_message(ctx, field)
+ case "files":
+ return ec.fieldContext_EditCommentOperation_files(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type EditCommentOperation", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Identity_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Identity",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().ID(rctx, obj)
@@ -6388,22 +7783,31 @@ func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.Coll
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Identity_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Identity",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Identity_humanId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().HumanID(rctx, obj)
@@ -6423,22 +7827,31 @@ func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_Identity_humanId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Identity",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Identity_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Identity",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name(), nil
@@ -6455,22 +7868,31 @@ func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.Co
return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Identity_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Identity",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Identity_email(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Email()
@@ -6487,22 +7909,31 @@ func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.C
return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Identity_email(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Identity",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Identity_login(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Login()
@@ -6519,22 +7950,31 @@ func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.C
return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_displayName(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Identity_login(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Identity",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Identity_displayName(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Identity_displayName(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DisplayName(), nil
@@ -6554,22 +7994,31 @@ func (ec *executionContext) _Identity_displayName(ctx context.Context, field gra
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Identity_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Identity",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Identity_avatarUrl(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.AvatarUrl()
@@ -6586,22 +8035,31 @@ func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graph
return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_isProtected(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Identity_avatarUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Identity",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Identity_isProtected(ctx context.Context, field graphql.CollectedField, obj models.IdentityWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Identity_isProtected(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsProtected()
@@ -6621,22 +8079,31 @@ func (ec *executionContext) _Identity_isProtected(ctx context.Context, field gra
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_Identity_isProtected(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Identity",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IdentityConnection_edges(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "IdentityConnection",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
@@ -6656,22 +8123,37 @@ func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field
return ec.marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdgeᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_IdentityConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "IdentityConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "cursor":
+ return ec.fieldContext_IdentityEdge_cursor(ctx, field)
+ case "node":
+ return ec.fieldContext_IdentityEdge_node(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type IdentityEdge", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IdentityConnection_nodes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
@@ -6691,22 +8173,49 @@ func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field
return ec.marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapperᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_IdentityConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "IdentityConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IdentityConnection_pageInfo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "IdentityConnection",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
@@ -6726,22 +8235,41 @@ func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, fi
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_IdentityConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "IdentityConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "hasNextPage":
+ return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
+ case "hasPreviousPage":
+ return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
+ case "startCursor":
+ return ec.fieldContext_PageInfo_startCursor(ctx, field)
+ case "endCursor":
+ return ec.fieldContext_PageInfo_endCursor(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IdentityConnection_totalCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
@@ -6761,22 +8289,31 @@ func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context,
return ec.marshalNInt2int(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_IdentityConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "IdentityConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _IdentityEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IdentityEdge_cursor(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "IdentityEdge",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
@@ -6796,22 +8333,31 @@ func (ec *executionContext) _IdentityEdge_cursor(ctx context.Context, field grap
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_IdentityEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "IdentityEdge",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_IdentityEdge_node(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
@@ -6831,22 +8377,49 @@ func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphq
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_IdentityEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "IdentityEdge",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Label_name(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Label_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Label",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Label().Name(rctx, obj)
@@ -6866,22 +8439,31 @@ func (ec *executionContext) _Label_name(ctx context.Context, field graphql.Colle
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Label_color(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Label_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Label",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _Label_color(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Label_color(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Label().Color(rctx, obj)
@@ -6901,22 +8483,39 @@ func (ec *executionContext) _Label_color(ctx context.Context, field graphql.Coll
return ec.marshalNColor2ᚖimageᚋcolorᚐRGBA(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_Label_color(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Label",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "R":
+ return ec.fieldContext_Color_R(ctx, field)
+ case "G":
+ return ec.fieldContext_Color_G(ctx, field)
+ case "B":
+ return ec.fieldContext_Color_B(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Color", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelChangeOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeOperation_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelChangeOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeOperation().ID(rctx, obj)
@@ -6936,22 +8535,31 @@ func (ec *executionContext) _LabelChangeOperation_id(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_LabelChangeOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "LabelChangeOperation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeOperation_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeOperation().Author(rctx, obj)
@@ -6971,22 +8579,49 @@ func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, fi
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelChangeOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeOperation_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelChangeOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeOperation().Date(rctx, obj)
@@ -7006,22 +8641,31 @@ func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, fiel
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelChangeOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeOperation_added(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelChangeOperation",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Added, nil
@@ -7041,22 +8685,37 @@ func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, fie
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "LabelChangeOperation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Label_name(ctx, field)
+ case "color":
+ return ec.fieldContext_Label_color(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeOperation_removed(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Removed, nil
@@ -7076,22 +8735,37 @@ func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, f
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelChangeOperation",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Label_name(ctx, field)
+ case "color":
+ return ec.fieldContext_Label_color(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelChangeResult_label(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeResult) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeResult_label(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelChangeResult",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Label, nil
@@ -7111,22 +8785,37 @@ func (ec *executionContext) _LabelChangeResult_label(ctx context.Context, field
return ec.marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelChangeResult_label(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelChangeResult",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Label_name(ctx, field)
+ case "color":
+ return ec.fieldContext_Label_color(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelChangeResult_status(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeResult) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeResult_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelChangeResult",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeResult().Status(rctx, obj)
@@ -7146,22 +8835,31 @@ func (ec *executionContext) _LabelChangeResult_status(ctx context.Context, field
return ec.marshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelChangeStatus(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelChangeResult_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelChangeResult",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type LabelChangeStatus does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelChangeTimelineItem_id(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeTimelineItem_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelChangeTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeTimelineItem().ID(rctx, obj)
@@ -7181,22 +8879,31 @@ func (ec *executionContext) _LabelChangeTimelineItem_id(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_LabelChangeTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "LabelChangeTimelineItem",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeTimelineItem_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeTimelineItem().Author(rctx, obj)
@@ -7216,22 +8923,49 @@ func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context,
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelChangeTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelChangeTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeTimelineItem_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelChangeTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeTimelineItem().Date(rctx, obj)
@@ -7251,22 +8985,31 @@ func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, f
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelChangeTimelineItem_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelChangeTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeTimelineItem_added(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelChangeTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Added, nil
@@ -7286,22 +9029,37 @@ func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context,
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_LabelChangeTimelineItem_added(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "LabelChangeTimelineItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Label_name(ctx, field)
+ case "color":
+ return ec.fieldContext_Label_color(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelChangeTimelineItem_removed(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Removed, nil
@@ -7321,22 +9079,37 @@ func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelChangeTimelineItem_removed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelChangeTimelineItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Label_name(ctx, field)
+ case "color":
+ return ec.fieldContext_Label_color(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelConnection_edges(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelConnection",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
@@ -7356,22 +9129,37 @@ func (ec *executionContext) _LabelConnection_edges(ctx context.Context, field gr
return ec.marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_LabelConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "LabelConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "cursor":
+ return ec.fieldContext_LabelEdge_cursor(ctx, field)
+ case "node":
+ return ec.fieldContext_LabelEdge_node(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LabelEdge", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelConnection_nodes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
@@ -7391,22 +9179,37 @@ func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field gr
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_LabelConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "LabelConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Label_name(ctx, field)
+ case "color":
+ return ec.fieldContext_Label_color(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelConnection_pageInfo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
@@ -7426,22 +9229,41 @@ func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "LabelConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "hasNextPage":
+ return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
+ case "hasPreviousPage":
+ return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
+ case "startCursor":
+ return ec.fieldContext_PageInfo_startCursor(ctx, field)
+ case "endCursor":
+ return ec.fieldContext_PageInfo_endCursor(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _LabelConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.LabelConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelConnection_totalCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
@@ -7461,22 +9283,31 @@ func (ec *executionContext) _LabelConnection_totalCount(ctx context.Context, fie
return ec.marshalNInt2int(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _LabelEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.LabelEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelEdge_cursor(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "LabelEdge",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
@@ -7496,22 +9327,31 @@ func (ec *executionContext) _LabelEdge_cursor(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.LabelEdge) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_LabelEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "LabelEdge",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _LabelEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.LabelEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_LabelEdge_node(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
@@ -7531,32 +9371,40 @@ func (ec *executionContext) _LabelEdge_node(ctx context.Context, field graphql.C
return ec.marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_LabelEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "LabelEdge",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Label_name(ctx, field)
+ case "color":
+ return ec.fieldContext_Label_color(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_newBug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Mutation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_newBug_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().NewBug(rctx, args["input"].(models.NewBugInput))
+ return ec.resolvers.Mutation().NewBug(rctx, fc.Args["input"].(models.NewBugInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -7573,32 +9421,53 @@ func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.
return ec.marshalNNewBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_addComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_newBug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientMutationId":
+ return ec.fieldContext_NewBugPayload_clientMutationId(ctx, field)
+ case "bug":
+ return ec.fieldContext_NewBugPayload_bug(ctx, field)
+ case "operation":
+ return ec.fieldContext_NewBugPayload_operation(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type NewBugPayload", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_addComment_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_newBug_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_addComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_addComment(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().AddComment(rctx, args["input"].(models.AddCommentInput))
+ return ec.resolvers.Mutation().AddComment(rctx, fc.Args["input"].(models.AddCommentInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -7615,32 +9484,53 @@ func (ec *executionContext) _Mutation_addComment(ctx context.Context, field grap
return ec.marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_addCommentAndClose(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_addComment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientMutationId":
+ return ec.fieldContext_AddCommentPayload_clientMutationId(ctx, field)
+ case "bug":
+ return ec.fieldContext_AddCommentPayload_bug(ctx, field)
+ case "operation":
+ return ec.fieldContext_AddCommentPayload_operation(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type AddCommentPayload", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_addCommentAndClose_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_addComment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_addCommentAndClose(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_addCommentAndClose(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().AddCommentAndClose(rctx, args["input"].(models.AddCommentAndCloseBugInput))
+ return ec.resolvers.Mutation().AddCommentAndClose(rctx, fc.Args["input"].(models.AddCommentAndCloseBugInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -7657,32 +9547,55 @@ func (ec *executionContext) _Mutation_addCommentAndClose(ctx context.Context, fi
return ec.marshalNAddCommentAndCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_addCommentAndReopen(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_addCommentAndClose(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientMutationId":
+ return ec.fieldContext_AddCommentAndCloseBugPayload_clientMutationId(ctx, field)
+ case "bug":
+ return ec.fieldContext_AddCommentAndCloseBugPayload_bug(ctx, field)
+ case "commentOperation":
+ return ec.fieldContext_AddCommentAndCloseBugPayload_commentOperation(ctx, field)
+ case "statusOperation":
+ return ec.fieldContext_AddCommentAndCloseBugPayload_statusOperation(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type AddCommentAndCloseBugPayload", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_addCommentAndReopen_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_addCommentAndClose_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_addCommentAndReopen(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_addCommentAndReopen(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().AddCommentAndReopen(rctx, args["input"].(models.AddCommentAndReopenBugInput))
+ return ec.resolvers.Mutation().AddCommentAndReopen(rctx, fc.Args["input"].(models.AddCommentAndReopenBugInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -7699,32 +9612,55 @@ func (ec *executionContext) _Mutation_addCommentAndReopen(ctx context.Context, f
return ec.marshalNAddCommentAndReopenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_editComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_addCommentAndReopen(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientMutationId":
+ return ec.fieldContext_AddCommentAndReopenBugPayload_clientMutationId(ctx, field)
+ case "bug":
+ return ec.fieldContext_AddCommentAndReopenBugPayload_bug(ctx, field)
+ case "commentOperation":
+ return ec.fieldContext_AddCommentAndReopenBugPayload_commentOperation(ctx, field)
+ case "statusOperation":
+ return ec.fieldContext_AddCommentAndReopenBugPayload_statusOperation(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type AddCommentAndReopenBugPayload", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_editComment_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_addCommentAndReopen_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_editComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_editComment(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().EditComment(rctx, args["input"].(models.EditCommentInput))
+ return ec.resolvers.Mutation().EditComment(rctx, fc.Args["input"].(models.EditCommentInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -7741,32 +9677,53 @@ func (ec *executionContext) _Mutation_editComment(ctx context.Context, field gra
return ec.marshalNEditCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_editComment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientMutationId":
+ return ec.fieldContext_EditCommentPayload_clientMutationId(ctx, field)
+ case "bug":
+ return ec.fieldContext_EditCommentPayload_bug(ctx, field)
+ case "operation":
+ return ec.fieldContext_EditCommentPayload_operation(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type EditCommentPayload", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_changeLabels_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_editComment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_changeLabels(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().ChangeLabels(rctx, args["input"].(*models.ChangeLabelInput))
+ return ec.resolvers.Mutation().ChangeLabels(rctx, fc.Args["input"].(*models.ChangeLabelInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -7783,32 +9740,55 @@ func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field gr
return ec.marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientMutationId":
+ return ec.fieldContext_ChangeLabelPayload_clientMutationId(ctx, field)
+ case "bug":
+ return ec.fieldContext_ChangeLabelPayload_bug(ctx, field)
+ case "operation":
+ return ec.fieldContext_ChangeLabelPayload_operation(ctx, field)
+ case "results":
+ return ec.fieldContext_ChangeLabelPayload_results(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type ChangeLabelPayload", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_openBug_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_changeLabels_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_openBug(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().OpenBug(rctx, args["input"].(models.OpenBugInput))
+ return ec.resolvers.Mutation().OpenBug(rctx, fc.Args["input"].(models.OpenBugInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -7825,32 +9805,53 @@ func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql
return ec.marshalNOpenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_openBug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientMutationId":
+ return ec.fieldContext_OpenBugPayload_clientMutationId(ctx, field)
+ case "bug":
+ return ec.fieldContext_OpenBugPayload_bug(ctx, field)
+ case "operation":
+ return ec.fieldContext_OpenBugPayload_operation(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type OpenBugPayload", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_closeBug_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_openBug_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_closeBug(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().CloseBug(rctx, args["input"].(models.CloseBugInput))
+ return ec.resolvers.Mutation().CloseBug(rctx, fc.Args["input"].(models.CloseBugInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -7867,32 +9868,53 @@ func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphq
return ec.marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Mutation_closeBug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Mutation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientMutationId":
+ return ec.fieldContext_CloseBugPayload_clientMutationId(ctx, field)
+ case "bug":
+ return ec.fieldContext_CloseBugPayload_bug(ctx, field)
+ case "operation":
+ return ec.fieldContext_CloseBugPayload_operation(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CloseBugPayload", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Mutation_setTitle_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Mutation_closeBug_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Mutation_setTitle(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Mutation().SetTitle(rctx, args["input"].(models.SetTitleInput))
+ return ec.resolvers.Mutation().SetTitle(rctx, fc.Args["input"].(models.SetTitleInput))
})
if err != nil {
ec.Error(ctx, err)
@@ -7909,22 +9931,50 @@ func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphq
return ec.marshalNSetTitlePayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _NewBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Mutation_setTitle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Mutation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "clientMutationId":
+ return ec.fieldContext_SetTitlePayload_clientMutationId(ctx, field)
+ case "bug":
+ return ec.fieldContext_SetTitlePayload_bug(ctx, field)
+ case "operation":
+ return ec.fieldContext_SetTitlePayload_operation(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SetTitlePayload", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "NewBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Mutation_setTitle_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _NewBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_NewBugPayload_clientMutationId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
@@ -7941,22 +9991,31 @@ func (ec *executionContext) _NewBugPayload_clientMutationId(ctx context.Context,
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _NewBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_NewBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "NewBugPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _NewBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_NewBugPayload_bug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
@@ -7976,22 +10035,59 @@ func (ec *executionContext) _NewBugPayload_bug(ctx context.Context, field graphq
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_NewBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "NewBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _NewBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_NewBugPayload_operation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "NewBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
@@ -8011,22 +10107,45 @@ func (ec *executionContext) _NewBugPayload_operation(ctx context.Context, field
return ec.marshalNCreateOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCreateOperation(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_NewBugPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "NewBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_CreateOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_CreateOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_CreateOperation_date(ctx, field)
+ case "title":
+ return ec.fieldContext_CreateOperation_title(ctx, field)
+ case "message":
+ return ec.fieldContext_CreateOperation_message(ctx, field)
+ case "files":
+ return ec.fieldContext_CreateOperation_files(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type CreateOperation", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _OpenBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OpenBugPayload_clientMutationId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "OpenBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
@@ -8043,22 +10162,31 @@ func (ec *executionContext) _OpenBugPayload_clientMutationId(ctx context.Context
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _OpenBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_OpenBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "OpenBugPayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _OpenBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OpenBugPayload_bug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
@@ -8078,22 +10206,59 @@ func (ec *executionContext) _OpenBugPayload_bug(ctx context.Context, field graph
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_OpenBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "OpenBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _OpenBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OpenBugPayload_operation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "OpenBugPayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
@@ -8113,22 +10278,41 @@ func (ec *executionContext) _OpenBugPayload_operation(ctx context.Context, field
return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetStatusOperation(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_OpenBugPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "OpenBugPayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_SetStatusOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_SetStatusOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_SetStatusOperation_date(ctx, field)
+ case "status":
+ return ec.fieldContext_SetStatusOperation_status(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SetStatusOperation", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _OperationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OperationConnection_edges(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "OperationConnection",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
@@ -8148,22 +10332,37 @@ func (ec *executionContext) _OperationConnection_edges(ctx context.Context, fiel
return ec.marshalNOperationEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdgeᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_OperationConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "OperationConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "cursor":
+ return ec.fieldContext_OperationEdge_cursor(ctx, field)
+ case "node":
+ return ec.fieldContext_OperationEdge_node(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type OperationEdge", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OperationConnection_nodes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
@@ -8178,27 +10377,36 @@ func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, fiel
}
return graphql.Null
}
- res := resTmp.([]bug.Operation)
+ res := resTmp.([]dag.Operation)
fc.Result = res
- return ec.marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperationᚄ(ctx, field.Selections, res)
+ return ec.marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperationᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_OperationConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "OperationConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OperationConnection_pageInfo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
@@ -8218,22 +10426,41 @@ func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, f
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "OperationConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "hasNextPage":
+ return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
+ case "hasPreviousPage":
+ return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
+ case "startCursor":
+ return ec.fieldContext_PageInfo_startCursor(ctx, field)
+ case "endCursor":
+ return ec.fieldContext_PageInfo_endCursor(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OperationConnection_totalCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
@@ -8253,22 +10480,31 @@ func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context,
return ec.marshalNInt2int(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "OperationConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OperationEdge_cursor(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "OperationEdge",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
@@ -8288,22 +10524,31 @@ func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field gra
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_OperationEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "OperationEdge",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_OperationEdge_node(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
@@ -8318,27 +10563,36 @@ func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graph
}
return graphql.Null
}
- res := resTmp.(bug.Operation)
+ res := resTmp.(dag.Operation)
fc.Result = res
- return ec.marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx, field.Selections, res)
+ return ec.marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperation(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_OperationEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "OperationEdge",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ return fc, nil
}
func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PageInfo_hasNextPage(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "PageInfo",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.HasNextPage, nil
@@ -8358,22 +10612,31 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "PageInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.HasPreviousPage, nil
@@ -8393,22 +10656,31 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "PageInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PageInfo_startCursor(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.StartCursor, nil
@@ -8428,22 +10700,31 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "PageInfo",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_PageInfo_endCursor(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.EndCursor, nil
@@ -8463,32 +10744,34 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph
return ec.marshalNString2string(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "PageInfo",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_repository(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query_repository_args(ctx, rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- fc.Args = args
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().Repository(rctx, args["ref"].(*string))
+ return ec.resolvers.Query().Repository(rctx, fc.Args["ref"].(*string))
})
if err != nil {
ec.Error(ctx, err)
@@ -8502,32 +10785,61 @@ func (ec *executionContext) _Query_repository(ctx context.Context, field graphql
return ec.marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Query_repository(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Repository_name(ctx, field)
+ case "allBugs":
+ return ec.fieldContext_Repository_allBugs(ctx, field)
+ case "bug":
+ return ec.fieldContext_Repository_bug(ctx, field)
+ case "allIdentities":
+ return ec.fieldContext_Repository_allIdentities(ctx, field)
+ case "identity":
+ return ec.fieldContext_Repository_identity(ctx, field)
+ case "userIdentity":
+ return ec.fieldContext_Repository_userIdentity(ctx, field)
+ case "validLabels":
+ return ec.fieldContext_Repository_validLabels(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Repository", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "Query",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query_repository_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Query___type_args(ctx, rawArgs)
+func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query___type(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.introspectType(args["name"].(string))
+ return ec.introspectType(fc.Args["name"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -8541,22 +10853,64 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Query",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query___schema(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.introspectSchema()
@@ -8573,22 +10927,45 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C
return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Query",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "description":
+ return ec.fieldContext___Schema_description(ctx, field)
+ case "types":
+ return ec.fieldContext___Schema_types(ctx, field)
+ case "queryType":
+ return ec.fieldContext___Schema_queryType(ctx, field)
+ case "mutationType":
+ return ec.fieldContext___Schema_mutationType(ctx, field)
+ case "subscriptionType":
+ return ec.fieldContext___Schema_subscriptionType(ctx, field)
+ case "directives":
+ return ec.fieldContext___Schema_directives(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Repository_name(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Repository_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "Repository",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Repository().Name(rctx, obj)
@@ -8605,32 +10982,34 @@ func (ec *executionContext) _Repository_name(ctx context.Context, field graphql.
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Repository_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Repository",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Repository_allBugs_args(ctx, rawArgs)
+func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Repository_allBugs(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Repository().AllBugs(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int), args["query"].(*string))
+ return ec.resolvers.Repository().AllBugs(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int), fc.Args["query"].(*string))
})
if err != nil {
ec.Error(ctx, err)
@@ -8647,32 +11026,55 @@ func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graph
return ec.marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Repository_allBugs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Repository",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "edges":
+ return ec.fieldContext_BugConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_BugConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_BugConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_BugConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BugConnection", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Repository_bug_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Repository_allBugs_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Repository_bug(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Repository().Bug(rctx, obj, args["prefix"].(string))
+ return ec.resolvers.Repository().Bug(rctx, obj, fc.Args["prefix"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -8686,32 +11088,73 @@ func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.C
return ec.marshalOBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Repository_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Repository",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Repository_allIdentities_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Repository_bug_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Repository_allIdentities(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Repository().AllIdentities(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
+ return ec.resolvers.Repository().AllIdentities(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -8728,32 +11171,55 @@ func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field
return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_identity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Repository_allIdentities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Repository",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "edges":
+ return ec.fieldContext_IdentityConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_IdentityConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_IdentityConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_IdentityConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type IdentityConnection", field.Name)
+ },
}
-
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Repository_identity_args(ctx, rawArgs)
- if err != nil {
+ if fc.Args, err = ec.field_Repository_allIdentities_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Repository_identity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Repository_identity(ctx, field)
+ if err != nil {
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Repository().Identity(rctx, obj, args["prefix"].(string))
+ return ec.resolvers.Repository().Identity(rctx, obj, fc.Args["prefix"].(string))
})
if err != nil {
ec.Error(ctx, err)
@@ -8767,22 +11233,60 @@ func (ec *executionContext) _Repository_identity(ctx context.Context, field grap
return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Repository_identity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Repository",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
}
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Repository_identity_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Repository_userIdentity(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Repository().UserIdentity(rctx, obj)
@@ -8799,32 +11303,52 @@ func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field
return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_validLabels(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_Repository_userIdentity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "Repository",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
- }
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field_Repository_validLabels_args(ctx, rawArgs)
+func (ec *executionContext) _Repository_validLabels(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Repository_validLabels(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Repository().ValidLabels(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
+ return ec.resolvers.Repository().ValidLabels(rctx, obj, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
})
if err != nil {
ec.Error(ctx, err)
@@ -8841,22 +11365,52 @@ func (ec *executionContext) _Repository_validLabels(ctx context.Context, field g
return ec.marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext_Repository_validLabels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Repository",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "edges":
+ return ec.fieldContext_LabelConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_LabelConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_LabelConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_LabelConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type LabelConnection", field.Name)
+ },
+ }
defer func() {
if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
}
}()
- fc := &graphql.FieldContext{
- Object: "SetStatusOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Repository_validLabels_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) _SetStatusOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetStatusOperation_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusOperation().ID(rctx, obj)
@@ -8876,22 +11430,31 @@ func (ec *executionContext) _SetStatusOperation_id(ctx context.Context, field gr
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_SetStatusOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "SetStatusOperation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetStatusOperation_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusOperation().Author(rctx, obj)
@@ -8911,22 +11474,49 @@ func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, fiel
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetStatusOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetStatusOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetStatusOperation_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetStatusOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusOperation().Date(rctx, obj)
@@ -8946,22 +11536,31 @@ func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_SetStatusOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "SetStatusOperation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetStatusOperation_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusOperation().Status(rctx, obj)
@@ -8981,22 +11580,31 @@ func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, fiel
return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetStatusOperation_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetStatusOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Status does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetStatusTimelineItem_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetStatusTimelineItem_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetStatusTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusTimelineItem().ID(rctx, obj)
@@ -9016,22 +11624,31 @@ func (ec *executionContext) _SetStatusTimelineItem_id(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_SetStatusTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "SetStatusTimelineItem",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetStatusTimelineItem_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusTimelineItem().Author(rctx, obj)
@@ -9051,22 +11668,49 @@ func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, f
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetStatusTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetStatusTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetStatusTimelineItem_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetStatusTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusTimelineItem().Date(rctx, obj)
@@ -9086,22 +11730,31 @@ func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, fie
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_SetStatusTimelineItem_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "SetStatusTimelineItem",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetStatusTimelineItem_status(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusTimelineItem().Status(rctx, obj)
@@ -9121,22 +11774,31 @@ func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, f
return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetStatusTimelineItem_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetStatusTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Status does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetTitleOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleOperation_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetTitleOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetTitleOperation().ID(rctx, obj)
@@ -9156,22 +11818,31 @@ func (ec *executionContext) _SetTitleOperation_id(ctx context.Context, field gra
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_SetTitleOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "SetTitleOperation",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleOperation_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetTitleOperation().Author(rctx, obj)
@@ -9191,22 +11862,49 @@ func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetTitleOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetTitleOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleOperation_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetTitleOperation",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetTitleOperation().Date(rctx, obj)
@@ -9226,22 +11924,31 @@ func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field g
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetTitleOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetTitleOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleOperation_title(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetTitleOperation",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Title, nil
@@ -9261,22 +11968,31 @@ func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_SetTitleOperation_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "SetTitleOperation",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleOperation_was(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Was, nil
@@ -9296,22 +12012,31 @@ func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field gr
return ec.marshalNString2string(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetTitleOperation_was(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetTitleOperation",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetTitlePayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitlePayload_clientMutationId(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetTitlePayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
@@ -9328,22 +12053,31 @@ func (ec *executionContext) _SetTitlePayload_clientMutationId(ctx context.Contex
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitlePayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_SetTitlePayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "SetTitlePayload",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SetTitlePayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitlePayload_bug(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
@@ -9363,22 +12097,59 @@ func (ec *executionContext) _SetTitlePayload_bug(ctx context.Context, field grap
return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetTitlePayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetTitlePayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Bug_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Bug_humanId(ctx, field)
+ case "status":
+ return ec.fieldContext_Bug_status(ctx, field)
+ case "title":
+ return ec.fieldContext_Bug_title(ctx, field)
+ case "labels":
+ return ec.fieldContext_Bug_labels(ctx, field)
+ case "author":
+ return ec.fieldContext_Bug_author(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
+ case "actors":
+ return ec.fieldContext_Bug_actors(ctx, field)
+ case "participants":
+ return ec.fieldContext_Bug_participants(ctx, field)
+ case "comments":
+ return ec.fieldContext_Bug_comments(ctx, field)
+ case "timeline":
+ return ec.fieldContext_Bug_timeline(ctx, field)
+ case "operations":
+ return ec.fieldContext_Bug_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Bug", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetTitlePayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitlePayload_operation(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetTitlePayload",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
@@ -9398,22 +12169,43 @@ func (ec *executionContext) _SetTitlePayload_operation(ctx context.Context, fiel
return ec.marshalNSetTitleOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetTitleOperation(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetTitlePayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetTitlePayload",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_SetTitleOperation_id(ctx, field)
+ case "author":
+ return ec.fieldContext_SetTitleOperation_author(ctx, field)
+ case "date":
+ return ec.fieldContext_SetTitleOperation_date(ctx, field)
+ case "title":
+ return ec.fieldContext_SetTitleOperation_title(ctx, field)
+ case "was":
+ return ec.fieldContext_SetTitleOperation_was(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type SetTitleOperation", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetTitleTimelineItem_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleTimelineItem_id(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetTitleTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetTitleTimelineItem().ID(rctx, obj)
@@ -9433,22 +12225,31 @@ func (ec *executionContext) _SetTitleTimelineItem_id(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_SetTitleTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "SetTitleTimelineItem",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleTimelineItem_author(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetTitleTimelineItem().Author(rctx, obj)
@@ -9468,22 +12269,49 @@ func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, fi
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetTitleTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetTitleTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "id":
+ return ec.fieldContext_Identity_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Identity_humanId(ctx, field)
+ case "name":
+ return ec.fieldContext_Identity_name(ctx, field)
+ case "email":
+ return ec.fieldContext_Identity_email(ctx, field)
+ case "login":
+ return ec.fieldContext_Identity_login(ctx, field)
+ case "displayName":
+ return ec.fieldContext_Identity_displayName(ctx, field)
+ case "avatarUrl":
+ return ec.fieldContext_Identity_avatarUrl(ctx, field)
+ case "isProtected":
+ return ec.fieldContext_Identity_isProtected(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleTimelineItem_date(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetTitleTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: true,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetTitleTimelineItem().Date(rctx, obj)
@@ -9503,22 +12331,31 @@ func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, fiel
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetTitleTimelineItem_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetTitleTimelineItem",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Time does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleTimelineItem_title(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "SetTitleTimelineItem",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Title, nil
@@ -9538,22 +12375,31 @@ func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_SetTitleTimelineItem_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "SetTitleTimelineItem",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SetTitleTimelineItem_was(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Was, nil
@@ -9573,22 +12419,31 @@ func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_SetTitleTimelineItem_was(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SetTitleTimelineItem",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TimelineItemConnection_edges(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TimelineItemConnection",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
@@ -9608,22 +12463,37 @@ func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, f
return ec.marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdgeᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_TimelineItemConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "TimelineItemConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "cursor":
+ return ec.fieldContext_TimelineItemEdge_cursor(ctx, field)
+ case "node":
+ return ec.fieldContext_TimelineItemEdge_node(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type TimelineItemEdge", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TimelineItemConnection_nodes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
@@ -9643,22 +12513,31 @@ func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, f
return ec.marshalNTimelineItem2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItemᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "TimelineItemConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TimelineItemConnection_pageInfo(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
@@ -9678,22 +12557,41 @@ func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_TimelineItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "TimelineItemConnection",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "hasNextPage":
+ return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
+ case "hasPreviousPage":
+ return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
+ case "startCursor":
+ return ec.fieldContext_PageInfo_startCursor(ctx, field)
+ case "endCursor":
+ return ec.fieldContext_PageInfo_endCursor(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TimelineItemConnection_totalCount(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
@@ -9713,22 +12611,31 @@ func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Conte
return ec.marshalNInt2int(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TimelineItemConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TimelineItemEdge_cursor(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "TimelineItemEdge",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
@@ -9748,22 +12655,31 @@ func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext_TimelineItemEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "TimelineItemEdge",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TimelineItemEdge_node(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
@@ -9783,22 +12699,31 @@ func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field gr
return ec.marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItem(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext_TimelineItemEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TimelineItemEdge",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
@@ -9818,25 +12743,34 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Directive",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
+ return obj.Description(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -9845,27 +12779,36 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
}
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_locations(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Directive",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Locations, nil
@@ -9885,22 +12828,31 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr
return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Directive",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type __DirectiveLocation does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_args(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Args, nil
@@ -9920,22 +12872,41 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Directive",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___InputValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___InputValue_description(ctx, field)
+ case "type":
+ return ec.fieldContext___InputValue_type(ctx, field)
+ case "defaultValue":
+ return ec.fieldContext___InputValue_defaultValue(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsRepeatable, nil
@@ -9955,22 +12926,31 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Directive",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__EnumValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
@@ -9990,25 +12970,34 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__EnumValue",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
+ return obj.Description(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -10017,27 +13006,36 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__EnumValue",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsDeprecated(), nil
@@ -10057,22 +13055,31 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__EnumValue",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DeprecationReason(), nil
@@ -10089,22 +13096,31 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context,
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__EnumValue",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
@@ -10124,25 +13140,34 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Field",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
+ return obj.Description(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -10151,27 +13176,36 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
}
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_args(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Args, nil
@@ -10191,22 +13225,41 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Field",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___InputValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___InputValue_description(ctx, field)
+ case "type":
+ return ec.fieldContext___InputValue_type(ctx, field)
+ case "defaultValue":
+ return ec.fieldContext___InputValue_defaultValue(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Type, nil
@@ -10226,22 +13279,53 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Field",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsDeprecated(), nil
@@ -10261,22 +13345,31 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Field",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Boolean does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Field_deprecationReason(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DeprecationReason(), nil
@@ -10293,22 +13386,31 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Field",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
@@ -10328,25 +13430,34 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__InputValue",
Field: field,
- Args: nil,
IsMethod: false,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Description, nil
+ return obj.Description(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -10355,27 +13466,36 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
}
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_type(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Type, nil
@@ -10395,22 +13515,53 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__InputValue",
- Field: field,
- Args: nil,
- IsMethod: false,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DefaultValue, nil
@@ -10427,22 +13578,72 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__InputValue",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Description(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*string)
+ fc.Result = res
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Schema",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_types(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Types(), nil
@@ -10462,22 +13663,53 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C
return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_queryType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.QueryType(), nil
@@ -10497,22 +13729,53 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_mutationType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MutationType(), nil
@@ -10529,22 +13792,53 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.SubscriptionType(), nil
@@ -10561,22 +13855,53 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Schema_directives(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Schema",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Directives(), nil
@@ -10596,22 +13921,43 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap
return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Schema",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___Directive_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Directive_description(ctx, field)
+ case "locations":
+ return ec.fieldContext___Directive_locations(ctx, field)
+ case "args":
+ return ec.fieldContext___Directive_args(ctx, field)
+ case "isRepeatable":
+ return ec.fieldContext___Directive_isRepeatable(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_kind(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Kind(), nil
@@ -10631,22 +13977,31 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll
return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type __TypeKind does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name(), nil
@@ -10663,22 +14018,31 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
+func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_description(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description(), nil
@@ -10690,37 +14054,39 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalOString2string(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
}
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field___Type_fields_args(ctx, rawArgs)
+func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_fields(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Fields(args["includeDeprecated"].(bool)), nil
+ return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -10734,22 +14100,56 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co
return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___Field_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Field_description(ctx, field)
+ case "args":
+ return ec.fieldContext___Field_args(ctx, field)
+ case "type":
+ return ec.fieldContext___Field_type(ctx, field)
+ case "isDeprecated":
+ return ec.fieldContext___Field_isDeprecated(ctx, field)
+ case "deprecationReason":
+ return ec.fieldContext___Field_deprecationReason(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name)
+ },
+ }
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
}
+ return fc, nil
+}
+func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_interfaces(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Interfaces(), nil
@@ -10766,22 +14166,53 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_possibleTypes(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
- Object: "__Type",
- Field: field,
- Args: nil,
- IsMethod: true,
- IsResolver: false,
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PossibleTypes(), nil
@@ -10798,32 +14229,56 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
- }
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
- ctx = graphql.WithFieldContext(ctx, fc)
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
+func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_enumValues(ctx, field)
if err != nil {
- ec.Error(ctx, err)
return graphql.Null
}
- fc.Args = args
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.EnumValues(args["includeDeprecated"].(bool)), nil
+ return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -10837,22 +14292,52 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- fc := &graphql.FieldContext{
+func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___EnumValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___EnumValue_description(ctx, field)
+ case "isDeprecated":
+ return ec.fieldContext___EnumValue_isDeprecated(ctx, field)
+ case "deprecationReason":
+ return ec.fieldContext___EnumValue_deprecationReason(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name)
+ },
}
+ defer func() {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ return fc, nil
+}
+func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_inputFields(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.InputFields(), nil
@@ -10869,25 +14354,107 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
}
+func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext___InputValue_name(ctx, field)
+ case "description":
+ return ec.fieldContext___InputValue_description(ctx, field)
+ case "type":
+ return ec.fieldContext___InputValue_type(ctx, field)
+ case "defaultValue":
+ return ec.fieldContext___InputValue_defaultValue(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_ofType(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
- fc := &graphql.FieldContext{
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.OfType(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ return graphql.Null
+ }
+ res := resTmp.(*introspection.Type)
+ fc.Result = res
+ return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
Object: "__Type",
Field: field,
- Args: nil,
IsMethod: true,
IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "kind":
+ return ec.fieldContext___Type_kind(ctx, field)
+ case "name":
+ return ec.fieldContext___Type_name(ctx, field)
+ case "description":
+ return ec.fieldContext___Type_description(ctx, field)
+ case "fields":
+ return ec.fieldContext___Type_fields(ctx, field)
+ case "interfaces":
+ return ec.fieldContext___Type_interfaces(ctx, field)
+ case "possibleTypes":
+ return ec.fieldContext___Type_possibleTypes(ctx, field)
+ case "enumValues":
+ return ec.fieldContext___Type_enumValues(ctx, field)
+ case "inputFields":
+ return ec.fieldContext___Type_inputFields(ctx, field)
+ case "ofType":
+ return ec.fieldContext___Type_ofType(ctx, field)
+ case "specifiedByURL":
+ return ec.fieldContext___Type_specifiedByURL(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field)
+ if err != nil {
+ return graphql.Null
}
-
ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return obj.OfType(), nil
+ return obj.SpecifiedByURL(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -10896,9 +14463,22 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co
if resTmp == nil {
return graphql.Null
}
- res := resTmp.(*introspection.Type)
+ res := resTmp.(*string)
fc.Result = res
- return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
+ return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "__Type",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
}
// endregion **************************** field.gotpl *****************************
@@ -10912,7 +14492,12 @@ func (ec *executionContext) unmarshalInputAddCommentAndCloseBugInput(ctx context
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"clientMutationId", "repoRef", "prefix", "message", "files"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "clientMutationId":
var err error
@@ -10967,7 +14552,12 @@ func (ec *executionContext) unmarshalInputAddCommentAndReopenBugInput(ctx contex
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"clientMutationId", "repoRef", "prefix", "message", "files"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "clientMutationId":
var err error
@@ -11022,7 +14612,12 @@ func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, o
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"clientMutationId", "repoRef", "prefix", "message", "files"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "clientMutationId":
var err error
@@ -11077,7 +14672,12 @@ func (ec *executionContext) unmarshalInputChangeLabelInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"clientMutationId", "repoRef", "prefix", "added", "Removed"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "clientMutationId":
var err error
@@ -11132,7 +14732,12 @@ func (ec *executionContext) unmarshalInputCloseBugInput(ctx context.Context, obj
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"clientMutationId", "repoRef", "prefix"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "clientMutationId":
var err error
@@ -11171,7 +14776,12 @@ func (ec *executionContext) unmarshalInputEditCommentInput(ctx context.Context,
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"clientMutationId", "repoRef", "prefix", "target", "message", "files"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "clientMutationId":
var err error
@@ -11234,7 +14844,12 @@ func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, obj i
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"clientMutationId", "repoRef", "title", "message", "files"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "clientMutationId":
var err error
@@ -11289,7 +14904,12 @@ func (ec *executionContext) unmarshalInputOpenBugInput(ctx context.Context, obj
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"clientMutationId", "repoRef", "prefix"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "clientMutationId":
var err error
@@ -11328,7 +14948,12 @@ func (ec *executionContext) unmarshalInputSetTitleInput(ctx context.Context, obj
asMap[k] = v
}
- for k, v := range asMap {
+ fieldsInOrder := [...]string{"clientMutationId", "repoRef", "prefix", "title"}
+ for _, k := range fieldsInOrder {
+ v, ok := asMap[k]
+ if !ok {
+ continue
+ }
switch k {
case "clientMutationId":
var err error
@@ -11448,7 +15073,7 @@ func (ec *executionContext) _Authored(ctx context.Context, sel ast.SelectionSet,
}
}
-func (ec *executionContext) _Operation(ctx context.Context, sel ast.SelectionSet, obj bug.Operation) graphql.Marshaler {
+func (ec *executionContext) _Operation(ctx context.Context, sel ast.SelectionSet, obj dag.Operation) graphql.Marshaler {
switch obj := (obj).(type) {
case nil:
return graphql.Null
@@ -11542,38 +15167,26 @@ func (ec *executionContext) _AddCommentAndCloseBugPayload(ctx context.Context, s
case "__typename":
out.Values[i] = graphql.MarshalString("AddCommentAndCloseBugPayload")
case "clientMutationId":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentAndCloseBugPayload_clientMutationId(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentAndCloseBugPayload_clientMutationId(ctx, field, obj)
case "bug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentAndCloseBugPayload_bug(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentAndCloseBugPayload_bug(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "commentOperation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentAndCloseBugPayload_commentOperation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentAndCloseBugPayload_commentOperation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "statusOperation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentAndCloseBugPayload_statusOperation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentAndCloseBugPayload_statusOperation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -11600,38 +15213,26 @@ func (ec *executionContext) _AddCommentAndReopenBugPayload(ctx context.Context,
case "__typename":
out.Values[i] = graphql.MarshalString("AddCommentAndReopenBugPayload")
case "clientMutationId":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentAndReopenBugPayload_clientMutationId(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentAndReopenBugPayload_clientMutationId(ctx, field, obj)
case "bug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentAndReopenBugPayload_bug(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentAndReopenBugPayload_bug(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "commentOperation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentAndReopenBugPayload_commentOperation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentAndReopenBugPayload_commentOperation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "statusOperation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentAndReopenBugPayload_statusOperation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentAndReopenBugPayload_statusOperation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -11718,21 +15319,15 @@ func (ec *executionContext) _AddCommentOperation(ctx context.Context, sel ast.Se
})
case "message":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentOperation_message(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentOperation_message(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "files":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentOperation_files(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentOperation_files(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -11759,28 +15354,19 @@ func (ec *executionContext) _AddCommentPayload(ctx context.Context, sel ast.Sele
case "__typename":
out.Values[i] = graphql.MarshalString("AddCommentPayload")
case "clientMutationId":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentPayload_clientMutationId(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentPayload_clientMutationId(ctx, field, obj)
case "bug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentPayload_bug(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentPayload_bug(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "operation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentPayload_operation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentPayload_operation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -11847,31 +15433,22 @@ func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast
})
case "message":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentTimelineItem_message(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentTimelineItem_message(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "messageIsEmpty":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentTimelineItem_messageIsEmpty(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentTimelineItem_messageIsEmpty(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "files":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentTimelineItem_files(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentTimelineItem_files(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -11917,21 +15494,15 @@ func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast
})
case "edited":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentTimelineItem_edited(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentTimelineItem_edited(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "history":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._AddCommentTimelineItem_history(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._AddCommentTimelineItem_history(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -12018,51 +15589,36 @@ func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj
})
case "title":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Bug_title(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Bug_title(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "labels":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Bug_labels(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Bug_labels(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "author":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Bug_author(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Bug_author(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "createdAt":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Bug_createdAt(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Bug_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "lastEdit":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Bug_lastEdit(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Bug_lastEdit(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -12189,41 +15745,29 @@ func (ec *executionContext) _BugConnection(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("BugConnection")
case "edges":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._BugConnection_edges(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._BugConnection_edges(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "nodes":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._BugConnection_nodes(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._BugConnection_nodes(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "pageInfo":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._BugConnection_pageInfo(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._BugConnection_pageInfo(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "totalCount":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._BugConnection_totalCount(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._BugConnection_totalCount(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -12250,21 +15794,15 @@ func (ec *executionContext) _BugEdge(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("BugEdge")
case "cursor":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._BugEdge_cursor(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._BugEdge_cursor(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "node":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._BugEdge_node(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._BugEdge_node(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -12291,38 +15829,26 @@ func (ec *executionContext) _ChangeLabelPayload(ctx context.Context, sel ast.Sel
case "__typename":
out.Values[i] = graphql.MarshalString("ChangeLabelPayload")
case "clientMutationId":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._ChangeLabelPayload_clientMutationId(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._ChangeLabelPayload_clientMutationId(ctx, field, obj)
case "bug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._ChangeLabelPayload_bug(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._ChangeLabelPayload_bug(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "operation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._ChangeLabelPayload_operation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._ChangeLabelPayload_operation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "results":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._ChangeLabelPayload_results(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._ChangeLabelPayload_results(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -12349,28 +15875,19 @@ func (ec *executionContext) _CloseBugPayload(ctx context.Context, sel ast.Select
case "__typename":
out.Values[i] = graphql.MarshalString("CloseBugPayload")
case "clientMutationId":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CloseBugPayload_clientMutationId(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CloseBugPayload_clientMutationId(ctx, field, obj)
case "bug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CloseBugPayload_bug(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CloseBugPayload_bug(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "operation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CloseBugPayload_operation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CloseBugPayload_operation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -12498,21 +16015,15 @@ func (ec *executionContext) _Comment(ctx context.Context, sel ast.SelectionSet,
})
case "message":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Comment_message(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Comment_message(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "files":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Comment_files(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Comment_files(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -12539,41 +16050,29 @@ func (ec *executionContext) _CommentConnection(ctx context.Context, sel ast.Sele
case "__typename":
out.Values[i] = graphql.MarshalString("CommentConnection")
case "edges":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CommentConnection_edges(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CommentConnection_edges(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "nodes":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CommentConnection_nodes(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CommentConnection_nodes(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "pageInfo":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CommentConnection_pageInfo(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CommentConnection_pageInfo(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "totalCount":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CommentConnection_totalCount(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CommentConnection_totalCount(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -12600,21 +16099,15 @@ func (ec *executionContext) _CommentEdge(ctx context.Context, sel ast.SelectionS
case "__typename":
out.Values[i] = graphql.MarshalString("CommentEdge")
case "cursor":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CommentEdge_cursor(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CommentEdge_cursor(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "node":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CommentEdge_node(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CommentEdge_node(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -12641,11 +16134,8 @@ func (ec *executionContext) _CommentHistoryStep(ctx context.Context, sel ast.Sel
case "__typename":
out.Values[i] = graphql.MarshalString("CommentHistoryStep")
case "message":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CommentHistoryStep_message(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CommentHistoryStep_message(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -12752,31 +16242,22 @@ func (ec *executionContext) _CreateOperation(ctx context.Context, sel ast.Select
})
case "title":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CreateOperation_title(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CreateOperation_title(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "message":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CreateOperation_message(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CreateOperation_message(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "files":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CreateOperation_files(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CreateOperation_files(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -12843,31 +16324,22 @@ func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.Sel
})
case "message":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CreateTimelineItem_message(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CreateTimelineItem_message(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "messageIsEmpty":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CreateTimelineItem_messageIsEmpty(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CreateTimelineItem_messageIsEmpty(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "files":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CreateTimelineItem_files(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CreateTimelineItem_files(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -12913,21 +16385,15 @@ func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.Sel
})
case "edited":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CreateTimelineItem_edited(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CreateTimelineItem_edited(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "history":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._CreateTimelineItem_history(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._CreateTimelineItem_history(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -13034,21 +16500,15 @@ func (ec *executionContext) _EditCommentOperation(ctx context.Context, sel ast.S
})
case "message":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._EditCommentOperation_message(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._EditCommentOperation_message(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "files":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._EditCommentOperation_files(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._EditCommentOperation_files(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -13075,28 +16535,19 @@ func (ec *executionContext) _EditCommentPayload(ctx context.Context, sel ast.Sel
case "__typename":
out.Values[i] = graphql.MarshalString("EditCommentPayload")
case "clientMutationId":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._EditCommentPayload_clientMutationId(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._EditCommentPayload_clientMutationId(ctx, field, obj)
case "bug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._EditCommentPayload_bug(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._EditCommentPayload_bug(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "operation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._EditCommentPayload_operation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._EditCommentPayload_operation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -13163,49 +16614,31 @@ func (ec *executionContext) _Identity(ctx context.Context, sel ast.SelectionSet,
})
case "name":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Identity_name(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Identity_name(ctx, field, obj)
case "email":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Identity_email(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Identity_email(ctx, field, obj)
case "login":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Identity_login(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Identity_login(ctx, field, obj)
case "displayName":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Identity_displayName(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Identity_displayName(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "avatarUrl":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Identity_avatarUrl(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Identity_avatarUrl(ctx, field, obj)
case "isProtected":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Identity_isProtected(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._Identity_isProtected(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -13232,41 +16665,29 @@ func (ec *executionContext) _IdentityConnection(ctx context.Context, sel ast.Sel
case "__typename":
out.Values[i] = graphql.MarshalString("IdentityConnection")
case "edges":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._IdentityConnection_edges(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._IdentityConnection_edges(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "nodes":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._IdentityConnection_nodes(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._IdentityConnection_nodes(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "pageInfo":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._IdentityConnection_pageInfo(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._IdentityConnection_pageInfo(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "totalCount":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._IdentityConnection_totalCount(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._IdentityConnection_totalCount(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -13293,21 +16714,15 @@ func (ec *executionContext) _IdentityEdge(ctx context.Context, sel ast.Selection
case "__typename":
out.Values[i] = graphql.MarshalString("IdentityEdge")
case "cursor":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._IdentityEdge_cursor(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._IdentityEdge_cursor(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "node":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._IdentityEdge_node(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._IdentityEdge_node(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -13455,21 +16870,15 @@ func (ec *executionContext) _LabelChangeOperation(ctx context.Context, sel ast.S
})
case "added":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelChangeOperation_added(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelChangeOperation_added(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "removed":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelChangeOperation_removed(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelChangeOperation_removed(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -13496,11 +16905,8 @@ func (ec *executionContext) _LabelChangeResult(ctx context.Context, sel ast.Sele
case "__typename":
out.Values[i] = graphql.MarshalString("LabelChangeResult")
case "label":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelChangeResult_label(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelChangeResult_label(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -13607,21 +17013,15 @@ func (ec *executionContext) _LabelChangeTimelineItem(ctx context.Context, sel as
})
case "added":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelChangeTimelineItem_added(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelChangeTimelineItem_added(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "removed":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelChangeTimelineItem_removed(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelChangeTimelineItem_removed(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -13648,41 +17048,29 @@ func (ec *executionContext) _LabelConnection(ctx context.Context, sel ast.Select
case "__typename":
out.Values[i] = graphql.MarshalString("LabelConnection")
case "edges":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelConnection_edges(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelConnection_edges(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "nodes":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelConnection_nodes(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelConnection_nodes(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "pageInfo":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelConnection_pageInfo(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelConnection_pageInfo(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "totalCount":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelConnection_totalCount(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelConnection_totalCount(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -13709,21 +17097,15 @@ func (ec *executionContext) _LabelEdge(ctx context.Context, sel ast.SelectionSet
case "__typename":
out.Values[i] = graphql.MarshalString("LabelEdge")
case "cursor":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelEdge_cursor(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelEdge_cursor(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "node":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._LabelEdge_node(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._LabelEdge_node(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -13759,91 +17141,82 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet)
case "__typename":
out.Values[i] = graphql.MarshalString("Mutation")
case "newBug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Mutation_newBug(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_newBug(ctx, field)
+ })
if out.Values[i] == graphql.Null {
invalids++
}
case "addComment":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Mutation_addComment(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_addComment(ctx, field)
+ })
if out.Values[i] == graphql.Null {
invalids++
}
case "addCommentAndClose":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Mutation_addCommentAndClose(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_addCommentAndClose(ctx, field)
+ })
if out.Values[i] == graphql.Null {
invalids++
}
case "addCommentAndReopen":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Mutation_addCommentAndReopen(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_addCommentAndReopen(ctx, field)
+ })
if out.Values[i] == graphql.Null {
invalids++
}
case "editComment":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Mutation_editComment(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_editComment(ctx, field)
+ })
if out.Values[i] == graphql.Null {
invalids++
}
case "changeLabels":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Mutation_changeLabels(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_changeLabels(ctx, field)
+ })
if out.Values[i] == graphql.Null {
invalids++
}
case "openBug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Mutation_openBug(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_openBug(ctx, field)
+ })
if out.Values[i] == graphql.Null {
invalids++
}
case "closeBug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Mutation_closeBug(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_closeBug(ctx, field)
+ })
if out.Values[i] == graphql.Null {
invalids++
}
case "setTitle":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Mutation_setTitle(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Mutation_setTitle(ctx, field)
+ })
if out.Values[i] == graphql.Null {
invalids++
@@ -13870,28 +17243,19 @@ func (ec *executionContext) _NewBugPayload(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("NewBugPayload")
case "clientMutationId":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._NewBugPayload_clientMutationId(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._NewBugPayload_clientMutationId(ctx, field, obj)
case "bug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._NewBugPayload_bug(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._NewBugPayload_bug(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "operation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._NewBugPayload_operation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._NewBugPayload_operation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -13918,28 +17282,19 @@ func (ec *executionContext) _OpenBugPayload(ctx context.Context, sel ast.Selecti
case "__typename":
out.Values[i] = graphql.MarshalString("OpenBugPayload")
case "clientMutationId":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._OpenBugPayload_clientMutationId(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._OpenBugPayload_clientMutationId(ctx, field, obj)
case "bug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._OpenBugPayload_bug(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._OpenBugPayload_bug(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "operation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._OpenBugPayload_operation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._OpenBugPayload_operation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -13966,41 +17321,29 @@ func (ec *executionContext) _OperationConnection(ctx context.Context, sel ast.Se
case "__typename":
out.Values[i] = graphql.MarshalString("OperationConnection")
case "edges":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._OperationConnection_edges(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._OperationConnection_edges(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "nodes":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._OperationConnection_nodes(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._OperationConnection_nodes(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "pageInfo":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._OperationConnection_pageInfo(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._OperationConnection_pageInfo(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "totalCount":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._OperationConnection_totalCount(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._OperationConnection_totalCount(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -14027,21 +17370,15 @@ func (ec *executionContext) _OperationEdge(ctx context.Context, sel ast.Selectio
case "__typename":
out.Values[i] = graphql.MarshalString("OperationEdge")
case "cursor":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._OperationEdge_cursor(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._OperationEdge_cursor(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "node":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._OperationEdge_node(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._OperationEdge_node(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -14068,41 +17405,29 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("PageInfo")
case "hasNextPage":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._PageInfo_hasNextPage(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "hasPreviousPage":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._PageInfo_hasPreviousPage(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "startCursor":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._PageInfo_startCursor(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "endCursor":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._PageInfo_endCursor(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -14158,18 +17483,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
return rrm(innerCtx)
})
case "__type":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Query___type(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Query___type(ctx, field)
+ })
case "__schema":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._Query___schema(ctx, field)
- }
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._Query___schema(ctx, field)
+ })
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -14604,21 +17927,15 @@ func (ec *executionContext) _SetTitleOperation(ctx context.Context, sel ast.Sele
})
case "title":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._SetTitleOperation_title(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._SetTitleOperation_title(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "was":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._SetTitleOperation_was(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._SetTitleOperation_was(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -14645,28 +17962,19 @@ func (ec *executionContext) _SetTitlePayload(ctx context.Context, sel ast.Select
case "__typename":
out.Values[i] = graphql.MarshalString("SetTitlePayload")
case "clientMutationId":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._SetTitlePayload_clientMutationId(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._SetTitlePayload_clientMutationId(ctx, field, obj)
case "bug":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._SetTitlePayload_bug(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._SetTitlePayload_bug(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "operation":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._SetTitlePayload_operation(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._SetTitlePayload_operation(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -14753,21 +18061,15 @@ func (ec *executionContext) _SetTitleTimelineItem(ctx context.Context, sel ast.S
})
case "title":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._SetTitleTimelineItem_title(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._SetTitleTimelineItem_title(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
}
case "was":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._SetTitleTimelineItem_was(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._SetTitleTimelineItem_was(ctx, field, obj)
if out.Values[i] == graphql.Null {
atomic.AddUint32(&invalids, 1)
@@ -14794,41 +18096,29 @@ func (ec *executionContext) _TimelineItemConnection(ctx context.Context, sel ast
case "__typename":
out.Values[i] = graphql.MarshalString("TimelineItemConnection")
case "edges":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._TimelineItemConnection_edges(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._TimelineItemConnection_edges(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "nodes":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._TimelineItemConnection_nodes(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._TimelineItemConnection_nodes(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "pageInfo":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._TimelineItemConnection_pageInfo(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._TimelineItemConnection_pageInfo(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "totalCount":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._TimelineItemConnection_totalCount(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._TimelineItemConnection_totalCount(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -14855,21 +18145,15 @@ func (ec *executionContext) _TimelineItemEdge(ctx context.Context, sel ast.Selec
case "__typename":
out.Values[i] = graphql.MarshalString("TimelineItemEdge")
case "cursor":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._TimelineItemEdge_cursor(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._TimelineItemEdge_cursor(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "node":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._TimelineItemEdge_node(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._TimelineItemEdge_node(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -14896,48 +18180,33 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS
case "__typename":
out.Values[i] = graphql.MarshalString("__Directive")
case "name":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Directive_name(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Directive_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "description":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Directive_description(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Directive_description(ctx, field, obj)
case "locations":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Directive_locations(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Directive_locations(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "args":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Directive_args(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Directive_args(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "isRepeatable":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Directive_isRepeatable(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -14964,38 +18233,26 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS
case "__typename":
out.Values[i] = graphql.MarshalString("__EnumValue")
case "name":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___EnumValue_name(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "description":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___EnumValue_description(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
case "isDeprecated":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___EnumValue_isDeprecated(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "deprecationReason":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___EnumValue_deprecationReason(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -15019,58 +18276,40 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet,
case "__typename":
out.Values[i] = graphql.MarshalString("__Field")
case "name":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Field_name(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Field_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "description":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Field_description(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Field_description(ctx, field, obj)
case "args":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Field_args(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Field_args(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "type":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Field_type(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Field_type(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "isDeprecated":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Field_isDeprecated(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "deprecationReason":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Field_deprecationReason(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -15094,38 +18333,26 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection
case "__typename":
out.Values[i] = graphql.MarshalString("__InputValue")
case "name":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___InputValue_name(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___InputValue_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "description":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___InputValue_description(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___InputValue_description(ctx, field, obj)
case "type":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___InputValue_type(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___InputValue_type(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "defaultValue":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___InputValue_defaultValue(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -15148,46 +18375,35 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet,
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("__Schema")
+ case "description":
+
+ out.Values[i] = ec.___Schema_description(ctx, field, obj)
+
case "types":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Schema_types(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Schema_types(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "queryType":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Schema_queryType(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "mutationType":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Schema_mutationType(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
case "subscriptionType":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Schema_subscriptionType(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
case "directives":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Schema_directives(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Schema_directives(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@@ -15214,70 +18430,47 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o
case "__typename":
out.Values[i] = graphql.MarshalString("__Type")
case "kind":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Type_kind(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Type_kind(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "name":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Type_name(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Type_name(ctx, field, obj)
case "description":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Type_description(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Type_description(ctx, field, obj)
case "fields":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Type_fields(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Type_fields(ctx, field, obj)
case "interfaces":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Type_interfaces(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
case "possibleTypes":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Type_possibleTypes(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
case "enumValues":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Type_enumValues(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
case "inputFields":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Type_inputFields(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
case "ofType":
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec.___Type_ofType(ctx, field, obj)
- }
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec.___Type_ofType(ctx, field, obj)
+
+ case "specifiedByURL":
+
+ out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -15306,7 +18499,7 @@ func (ec *executionContext) marshalNAddCommentAndCloseBugPayload2githubᚗcomᚋ
func (ec *executionContext) marshalNAddCommentAndCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentAndCloseBugPayload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15325,7 +18518,7 @@ func (ec *executionContext) marshalNAddCommentAndReopenBugPayload2githubᚗcom
func (ec *executionContext) marshalNAddCommentAndReopenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentAndReopenBugPayload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15340,7 +18533,7 @@ func (ec *executionContext) unmarshalNAddCommentInput2githubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐAddCommentOperation(ctx context.Context, sel ast.SelectionSet, v *bug.AddCommentOperation) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15354,7 +18547,7 @@ func (ec *executionContext) marshalNAddCommentPayload2githubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentPayload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15370,7 +18563,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se
res := graphql.MarshalBoolean(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -15379,7 +18572,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se
func (ec *executionContext) marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15437,7 +18630,7 @@ func (ec *executionContext) marshalNBugConnection2githubᚗcomᚋMichaelMureᚋg
func (ec *executionContext) marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v *models.BugConnection) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15491,7 +18684,7 @@ func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋg
func (ec *executionContext) marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v *models.BugEdge) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15505,7 +18698,7 @@ func (ec *executionContext) marshalNChangeLabelPayload2githubᚗcomᚋMichaelMur
func (ec *executionContext) marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx context.Context, sel ast.SelectionSet, v *models.ChangeLabelPayload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15524,7 +18717,7 @@ func (ec *executionContext) marshalNCloseBugPayload2githubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.CloseBugPayload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15538,7 +18731,7 @@ func (ec *executionContext) marshalNColor2imageᚋcolorᚐRGBA(ctx context.Conte
func (ec *executionContext) marshalNColor2ᚖimageᚋcolorᚐRGBA(ctx context.Context, sel ast.SelectionSet, v *color.RGBA) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15592,7 +18785,7 @@ func (ec *executionContext) marshalNComment2ᚕᚖgithubᚗcomᚋMichaelMureᚋg
func (ec *executionContext) marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐComment(ctx context.Context, sel ast.SelectionSet, v *bug.Comment) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15606,7 +18799,7 @@ func (ec *executionContext) marshalNCommentConnection2githubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v *models.CommentConnection) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15660,7 +18853,7 @@ func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v *models.CommentEdge) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15718,7 +18911,7 @@ func (ec *executionContext) marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichael
func (ec *executionContext) marshalNCreateOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCreateOperation(ctx context.Context, sel ast.SelectionSet, v *bug.CreateOperation) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15733,7 +18926,7 @@ func (ec *executionContext) unmarshalNEditCommentInput2githubᚗcomᚋMichaelMur
func (ec *executionContext) marshalNEditCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐEditCommentOperation(ctx context.Context, sel ast.SelectionSet, v *bug.EditCommentOperation) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15747,7 +18940,7 @@ func (ec *executionContext) marshalNEditCommentPayload2githubᚗcomᚋMichaelMur
func (ec *executionContext) marshalNEditCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentPayload(ctx context.Context, sel ast.SelectionSet, v *models.EditCommentPayload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15799,7 +18992,7 @@ func (ec *executionContext) marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑb
func (ec *executionContext) marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx context.Context, sel ast.SelectionSet, v models.IdentityWrapper) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15857,7 +19050,7 @@ func (ec *executionContext) marshalNIdentityConnection2githubᚗcomᚋMichaelMur
func (ec *executionContext) marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v *models.IdentityConnection) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15911,7 +19104,7 @@ func (ec *executionContext) marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMur
func (ec *executionContext) marshalNIdentityEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdge(ctx context.Context, sel ast.SelectionSet, v *models.IdentityEdge) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -15927,7 +19120,7 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti
res := graphql.MarshalInt(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -15984,7 +19177,7 @@ func (ec *executionContext) marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑ
func (ec *executionContext) marshalNLabelChangeOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelChangeOperation(ctx context.Context, sel ast.SelectionSet, v *bug.LabelChangeOperation) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16046,7 +19239,7 @@ func (ec *executionContext) marshalNLabelConnection2githubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v *models.LabelConnection) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16100,7 +19293,7 @@ func (ec *executionContext) marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNLabelEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdge(ctx context.Context, sel ast.SelectionSet, v *models.LabelEdge) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16119,7 +19312,7 @@ func (ec *executionContext) marshalNNewBugPayload2githubᚗcomᚋMichaelMureᚋg
func (ec *executionContext) marshalNNewBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.NewBugPayload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16138,24 +19331,24 @@ func (ec *executionContext) marshalNOpenBugPayload2githubᚗcomᚋMichaelMureᚋ
func (ec *executionContext) marshalNOpenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.OpenBugPayload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
return ec._OpenBugPayload(ctx, sel, v)
}
-func (ec *executionContext) marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx context.Context, sel ast.SelectionSet, v bug.Operation) graphql.Marshaler {
+func (ec *executionContext) marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperation(ctx context.Context, sel ast.SelectionSet, v dag.Operation) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
return ec._Operation(ctx, sel, v)
}
-func (ec *executionContext) marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperationᚄ(ctx context.Context, sel ast.SelectionSet, v []bug.Operation) graphql.Marshaler {
+func (ec *executionContext) marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperationᚄ(ctx context.Context, sel ast.SelectionSet, v []dag.Operation) graphql.Marshaler {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
@@ -16179,7 +19372,7 @@ func (ec *executionContext) marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgi
if !isLen1 {
defer wg.Done()
}
- ret[i] = ec.marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx, sel, v[i])
+ ret[i] = ec.marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperation(ctx, sel, v[i])
}
if isLen1 {
f(i)
@@ -16206,7 +19399,7 @@ func (ec *executionContext) marshalNOperationConnection2githubᚗcomᚋMichaelMu
func (ec *executionContext) marshalNOperationConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx context.Context, sel ast.SelectionSet, v *models.OperationConnection) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16260,7 +19453,7 @@ func (ec *executionContext) marshalNOperationEdge2ᚕᚖgithubᚗcomᚋMichaelMu
func (ec *executionContext) marshalNOperationEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdge(ctx context.Context, sel ast.SelectionSet, v *models.OperationEdge) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16270,7 +19463,7 @@ func (ec *executionContext) marshalNOperationEdge2ᚖgithubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *models.PageInfo) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16280,7 +19473,7 @@ func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgit
func (ec *executionContext) marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetStatusOperation(ctx context.Context, sel ast.SelectionSet, v *bug.SetStatusOperation) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16295,7 +19488,7 @@ func (ec *executionContext) unmarshalNSetTitleInput2githubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNSetTitleOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetTitleOperation(ctx context.Context, sel ast.SelectionSet, v *bug.SetTitleOperation) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16309,7 +19502,7 @@ func (ec *executionContext) marshalNSetTitlePayload2githubᚗcomᚋMichaelMure
func (ec *executionContext) marshalNSetTitlePayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx context.Context, sel ast.SelectionSet, v *models.SetTitlePayload) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16335,7 +19528,7 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S
res := graphql.MarshalString(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -16350,7 +19543,7 @@ func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel as
res := graphql.MarshalTime(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -16364,14 +19557,14 @@ func (ec *executionContext) unmarshalNTime2ᚖtimeᚐTime(ctx context.Context, v
func (ec *executionContext) marshalNTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
res := graphql.MarshalTime(*v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -16380,7 +19573,7 @@ func (ec *executionContext) marshalNTime2ᚖtimeᚐTime(ctx context.Context, sel
func (ec *executionContext) marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItem(ctx context.Context, sel ast.SelectionSet, v bug.TimelineItem) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16438,7 +19631,7 @@ func (ec *executionContext) marshalNTimelineItemConnection2githubᚗcomᚋMichae
func (ec *executionContext) marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx context.Context, sel ast.SelectionSet, v *models.TimelineItemConnection) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16492,7 +19685,7 @@ func (ec *executionContext) marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋMichae
func (ec *executionContext) marshalNTimelineItemEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx context.Context, sel ast.SelectionSet, v *models.TimelineItemEdge) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16556,7 +19749,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte
res := graphql.MarshalString(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
@@ -16730,7 +19923,7 @@ func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgen
func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
@@ -16746,7 +19939,7 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a
res := graphql.MarshalString(v)
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
return res
diff --git a/api/graphql/models/gen_models.go b/api/graphql/models/gen_models.go
index 203d6451..5e2e1715 100644
--- a/api/graphql/models/gen_models.go
+++ b/api/graphql/models/gen_models.go
@@ -8,6 +8,7 @@ import (
"strconv"
"github.com/MichaelMure/git-bug/bug"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/repository"
)
@@ -250,7 +251,7 @@ type OpenBugPayload struct {
// The connection type for an Operation
type OperationConnection struct {
Edges []*OperationEdge `json:"edges"`
- Nodes []bug.Operation `json:"nodes"`
+ Nodes []dag.Operation `json:"nodes"`
PageInfo *PageInfo `json:"pageInfo"`
TotalCount int `json:"totalCount"`
}
@@ -258,7 +259,7 @@ type OperationConnection struct {
// Represent an Operation
type OperationEdge struct {
Cursor string `json:"cursor"`
- Node bug.Operation `json:"node"`
+ Node dag.Operation `json:"node"`
}
// Information about pagination in a connection.
diff --git a/api/graphql/models/lazy_bug.go b/api/graphql/models/lazy_bug.go
index bc26aaca..092f2472 100644
--- a/api/graphql/models/lazy_bug.go
+++ b/api/graphql/models/lazy_bug.go
@@ -7,6 +7,7 @@ import (
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
)
// BugWrapper is an interface used by the GraphQL resolvers to handle a bug.
@@ -24,7 +25,7 @@ type BugWrapper interface {
Participants() ([]IdentityWrapper, error)
CreatedAt() time.Time
Timeline() ([]bug.TimelineItem, error)
- Operations() ([]bug.Operation, error)
+ Operations() ([]dag.Operation, error)
IsAuthored()
}
@@ -144,7 +145,7 @@ func (lb *lazyBug) Timeline() ([]bug.TimelineItem, error) {
return lb.snap.Timeline, nil
}
-func (lb *lazyBug) Operations() ([]bug.Operation, error) {
+func (lb *lazyBug) Operations() ([]dag.Operation, error) {
err := lb.load()
if err != nil {
return nil, err
@@ -210,6 +211,6 @@ func (l *loadedBug) Timeline() ([]bug.TimelineItem, error) {
return l.Snapshot.Timeline, nil
}
-func (l *loadedBug) Operations() ([]bug.Operation, error) {
+func (l *loadedBug) Operations() ([]dag.Operation, error) {
return l.Snapshot.Operations, nil
}
diff --git a/api/graphql/resolvers/bug.go b/api/graphql/resolvers/bug.go
index 815cba8d..18c8d7f4 100644
--- a/api/graphql/resolvers/bug.go
+++ b/api/graphql/resolvers/bug.go
@@ -7,6 +7,7 @@ import (
"github.com/MichaelMure/git-bug/api/graphql/graph"
"github.com/MichaelMure/git-bug/api/graphql/models"
"github.com/MichaelMure/git-bug/bug"
+ "github.com/MichaelMure/git-bug/entity/dag"
)
var _ graph.BugResolver = &bugResolver{}
@@ -69,14 +70,14 @@ func (bugResolver) Operations(_ context.Context, obj models.BugWrapper, after *s
Last: last,
}
- edger := func(op bug.Operation, offset int) connections.Edge {
+ edger := func(op dag.Operation, offset int) connections.Edge {
return models.OperationEdge{
Node: op,
Cursor: connections.OffsetToCursor(offset),
}
}
- conMaker := func(edges []*models.OperationEdge, nodes []bug.Operation, info *models.PageInfo, totalCount int) (*models.OperationConnection, error) {
+ conMaker := func(edges []*models.OperationEdge, nodes []dag.Operation, info *models.PageInfo, totalCount int) (*models.OperationConnection, error) {
return &models.OperationConnection{
Edges: edges,
Nodes: nodes,
diff --git a/bridge/github/export.go b/bridge/github/export.go
index 35d456c2..5164fcab 100644
--- a/bridge/github/export.go
+++ b/bridge/github/export.go
@@ -20,6 +20,7 @@ import (
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
)
@@ -288,7 +289,7 @@ func (ge *githubExporter) exportBug(ctx context.Context, b *cache.BugCache, out
for _, op := range snapshot.Operations[1:] {
// ignore SetMetadata operations
- if _, ok := op.(*bug.SetMetadataOperation); ok {
+ if _, ok := op.(dag.OperationDoesntChangeSnapshot); ok {
continue
}
diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go
index 94664853..93cc47c0 100644
--- a/bridge/github/export_test.go
+++ b/bridge/github/export_test.go
@@ -15,8 +15,8 @@ import (
"github.com/MichaelMure/git-bug/bridge/core"
"github.com/MichaelMure/git-bug/bridge/core/auth"
- "github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/repository"
"github.com/MichaelMure/git-bug/util/interrupt"
)
@@ -245,7 +245,7 @@ func TestGithubPushPull(t *testing.T) {
// verify operation have correct metadata
for _, op := range tt.bug.Snapshot().Operations {
// Check if the originals operations (*not* SetMetadata) are tagged properly
- if _, ok := op.(*bug.SetMetadataOperation); !ok {
+ if _, ok := op.(dag.OperationDoesntChangeSnapshot); !ok {
_, haveIDMetadata := op.GetMetadata(metaKeyGithubId)
require.True(t, haveIDMetadata)
diff --git a/bridge/github/import_test.go b/bridge/github/import_test.go
index df4989a4..f1c863ac 100644
--- a/bridge/github/import_test.go
+++ b/bridge/github/import_test.go
@@ -13,6 +13,7 @@ import (
"github.com/MichaelMure/git-bug/bridge/core/auth"
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
"github.com/MichaelMure/git-bug/util/interrupt"
@@ -44,7 +45,7 @@ func TestGithubImporter(t *testing.T) {
name: "simple issue",
url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/1",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "simple issue", "initial comment", nil),
bug.NewAddCommentOp(author, 0, "first comment", nil),
bug.NewAddCommentOp(author, 0, "second comment", nil),
@@ -55,7 +56,7 @@ func TestGithubImporter(t *testing.T) {
name: "empty issue",
url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/2",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "empty issue", "", nil),
},
},
@@ -64,7 +65,7 @@ func TestGithubImporter(t *testing.T) {
name: "complex issue",
url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/3",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "complex issue", "initial comment", nil),
bug.NewLabelChangeOperation(author, 0, []bug.Label{"bug"}, []bug.Label{}),
bug.NewLabelChangeOperation(author, 0, []bug.Label{"duplicate"}, []bug.Label{}),
@@ -81,7 +82,7 @@ func TestGithubImporter(t *testing.T) {
name: "editions",
url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/4",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "editions", "initial comment edited", nil),
bug.NewEditCommentOp(author, 0, "", "erased then edited again", nil),
bug.NewAddCommentOp(author, 0, "first comment", nil),
@@ -93,7 +94,7 @@ func TestGithubImporter(t *testing.T) {
name: "comment deletion",
url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/5",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "comment deletion", "", nil),
},
},
@@ -102,7 +103,7 @@ func TestGithubImporter(t *testing.T) {
name: "edition deletion",
url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/6",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "edition deletion", "initial comment", nil),
bug.NewEditCommentOp(author, 0, "", "initial comment edited again", nil),
bug.NewAddCommentOp(author, 0, "first comment", nil),
@@ -114,7 +115,7 @@ func TestGithubImporter(t *testing.T) {
name: "hidden comment",
url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/7",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "hidden comment", "initial comment", nil),
bug.NewAddCommentOp(author, 0, "first comment", nil),
},
@@ -124,7 +125,7 @@ func TestGithubImporter(t *testing.T) {
name: "transfered issue",
url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/8",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "transfered issue", "", nil),
},
},
@@ -133,7 +134,7 @@ func TestGithubImporter(t *testing.T) {
name: "unicode control characters",
url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/10",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "unicode control characters", "u0000: \nu0001: \nu0002: \nu0003: \nu0004: \nu0005: \nu0006: \nu0007: \nu0008: \nu0009: \t\nu0010: \nu0011: \nu0012: \nu0013: \nu0014: \nu0015: \nu0016: \nu0017: \nu0018: \nu0019:", nil),
},
},
diff --git a/bridge/gitlab/export.go b/bridge/gitlab/export.go
index e6587eba..bb83662e 100644
--- a/bridge/gitlab/export.go
+++ b/bridge/gitlab/export.go
@@ -15,6 +15,7 @@ import (
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
)
@@ -256,7 +257,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out
labelSet := make(map[string]struct{})
for _, op := range snapshot.Operations[1:] {
// ignore SetMetadata operations
- if _, ok := op.(*bug.SetMetadataOperation); ok {
+ if _, ok := op.(dag.OperationDoesntChangeSnapshot); ok {
continue
}
diff --git a/bridge/gitlab/export_test.go b/bridge/gitlab/export_test.go
index cca4c6ca..b48254e6 100644
--- a/bridge/gitlab/export_test.go
+++ b/bridge/gitlab/export_test.go
@@ -11,11 +11,12 @@ import (
"github.com/xanzy/go-gitlab"
+ "github.com/MichaelMure/git-bug/entity/dag"
+
"github.com/stretchr/testify/require"
"github.com/MichaelMure/git-bug/bridge/core"
"github.com/MichaelMure/git-bug/bridge/core/auth"
- "github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/repository"
"github.com/MichaelMure/git-bug/util/interrupt"
@@ -247,7 +248,7 @@ func TestGitlabPushPull(t *testing.T) {
// verify operation have correct metadata
for _, op := range tt.bug.Snapshot().Operations {
// Check if the originals operations (*not* SetMetadata) are tagged properly
- if _, ok := op.(*bug.SetMetadataOperation); !ok {
+ if _, ok := op.(dag.OperationDoesntChangeSnapshot); !ok {
_, haveIDMetadata := op.GetMetadata(metaKeyGitlabId)
require.True(t, haveIDMetadata)
@@ -272,7 +273,7 @@ func TestGitlabPushPull(t *testing.T) {
require.True(t, ok)
require.Equal(t, issueOrigin, target)
- //TODO: maybe more tests to ensure bug final state
+ // TODO: maybe more tests to ensure bug final state
})
}
}
diff --git a/bridge/gitlab/import_test.go b/bridge/gitlab/import_test.go
index 676e8749..a4a9ce15 100644
--- a/bridge/gitlab/import_test.go
+++ b/bridge/gitlab/import_test.go
@@ -13,6 +13,7 @@ import (
"github.com/MichaelMure/git-bug/bridge/core/auth"
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
"github.com/MichaelMure/git-bug/util/interrupt"
@@ -49,7 +50,7 @@ func TestGitlabImport(t *testing.T) {
name: "simple issue",
url: "https://gitlab.com/git-bug/test/-/issues/1",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "simple issue", "initial comment", nil),
bug.NewAddCommentOp(author, 0, "first comment", nil),
bug.NewAddCommentOp(author, 0, "second comment", nil),
@@ -60,7 +61,7 @@ func TestGitlabImport(t *testing.T) {
name: "empty issue",
url: "https://gitlab.com/git-bug/test/-/issues/2",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "empty issue", "", nil),
},
},
@@ -69,7 +70,7 @@ func TestGitlabImport(t *testing.T) {
name: "complex issue",
url: "https://gitlab.com/git-bug/test/-/issues/3",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "complex issue", "initial comment", nil),
bug.NewAddCommentOp(author, 0, "### header\n\n**bold**\n\n_italic_\n\n> with quote\n\n`inline code`\n\n```\nmultiline code\n```\n\n- bulleted\n- list\n\n1. numbered\n1. list\n\n- [ ] task\n- [x] list\n\n@MichaelMure mention\n\n#2 reference issue\n#3 auto-reference issue", nil),
bug.NewSetTitleOp(author, 0, "complex issue edited", "complex issue"),
@@ -86,7 +87,7 @@ func TestGitlabImport(t *testing.T) {
name: "editions",
url: "https://gitlab.com/git-bug/test/-/issues/4",
bug: &bug.Snapshot{
- Operations: []bug.Operation{
+ Operations: []dag.Operation{
bug.NewCreateOp(author, 0, "editions", "initial comment edited", nil),
bug.NewAddCommentOp(author, 0, "first comment edited", nil),
},
diff --git a/bridge/jira/export.go b/bridge/jira/export.go
index e5c19074..0cadf754 100644
--- a/bridge/jira/export.go
+++ b/bridge/jira/export.go
@@ -15,6 +15,7 @@ import (
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
)
@@ -297,7 +298,7 @@ func (je *jiraExporter) exportBug(ctx context.Context, b *cache.BugCache, out ch
for _, op := range snapshot.Operations[1:] {
// ignore SetMetadata operations
- if _, ok := op.(*bug.SetMetadataOperation); ok {
+ if _, ok := op.(dag.OperationDoesntChangeSnapshot); ok {
continue
}
diff --git a/bridge/jira/import.go b/bridge/jira/import.go
index d601febb..572c393e 100644
--- a/bridge/jira/import.go
+++ b/bridge/jira/import.go
@@ -14,6 +14,7 @@ import (
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/util/text"
)
@@ -377,7 +378,7 @@ func labelSetsMatch(jiraSet []string, gitbugSet []bug.Label) bool {
// Create a bug.Operation (or a series of operations) from a JIRA changelog
// entry
-func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, entry ChangeLogEntry, potentialOp bug.Operation) error {
+func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, entry ChangeLogEntry, potentialOp dag.Operation) error {
// If we have an operation which is already mapped to the entire changelog
// entry then that means this changelog entry was induced by an export
diff --git a/bug/bug.go b/bug/bug.go
index 48269a91..dce30f76 100644
--- a/bug/bug.go
+++ b/bug/bug.go
@@ -44,11 +44,7 @@ func NewBug() *Bug {
// Read will read a bug from a repository
func Read(repo repository.ClockedRepo, id entity.Id) (*Bug, error) {
- e, err := dag.Read(def, repo, identity.NewSimpleResolver(repo), id)
- if err != nil {
- return nil, err
- }
- return &Bug{Entity: e}, nil
+ return ReadWithResolver(repo, identity.NewSimpleResolver(repo), id)
}
// ReadWithResolver will read a bug from its Id, with a custom identity.Resolver
@@ -144,21 +140,21 @@ func (bug *Bug) Operations() []Operation {
}
// Compile a bug in a easily usable snapshot
-func (bug *Bug) Compile() Snapshot {
- snap := Snapshot{
+func (bug *Bug) Compile() *Snapshot {
+ snap := &Snapshot{
id: bug.Id(),
Status: OpenStatus,
}
for _, op := range bug.Operations() {
- op.Apply(&snap)
+ op.Apply(snap)
snap.Operations = append(snap.Operations, op)
}
return snap
}
-// Lookup for the very first operation of the bug.
+// FirstOp lookup for the very first operation of the bug.
// For a valid Bug, this operation should be a CreateOp
func (bug *Bug) FirstOp() Operation {
if fo := bug.Entity.FirstOp(); fo != nil {
@@ -167,7 +163,7 @@ func (bug *Bug) FirstOp() Operation {
return nil
}
-// Lookup for the very last operation of the bug.
+// LastOp lookup for the very last operation of the bug.
// For a valid Bug, should never be nil
func (bug *Bug) LastOp() Operation {
if lo := bug.Entity.LastOp(); lo != nil {
diff --git a/bug/comment.go b/bug/comment.go
index c1cfc7e5..03d58da5 100644
--- a/bug/comment.go
+++ b/bug/comment.go
@@ -41,5 +41,5 @@ func (c Comment) FormatTime() string {
return c.UnixTime.Time().Format("Mon Jan 2 15:04:05 2006 +0200")
}
-// Sign post method for gqlgen
+// IsAuthored is a sign post method for gqlgen
func (c Comment) IsAuthored() {}
diff --git a/bug/interface.go b/bug/interface.go
index e71496a9..2ae31fd1 100644
--- a/bug/interface.go
+++ b/bug/interface.go
@@ -7,34 +7,34 @@ import (
)
type Interface interface {
- // Id return the Bug identifier
+ // Id returns the Bug identifier
Id() entity.Id
- // Validate check if the Bug data is valid
+ // Validate checks if the Bug data is valid
Validate() error
// Append an operation into the staging area, to be committed later
Append(op Operation)
- // Operations return the ordered operations
+ // Operations returns the ordered operations
Operations() []Operation
- // Indicate that the in-memory state changed and need to be commit in the repository
+ // NeedCommit indicates that the in-memory state changed and need to be commit in the repository
NeedCommit() bool
- // Commit write the staging area in Git and move the operations to the packs
+ // Commit writes the staging area in Git and move the operations to the packs
Commit(repo repository.ClockedRepo) error
- // Lookup for the very first operation of the bug.
+ // FirstOp lookup for the very first operation of the bug.
// For a valid Bug, this operation should be a CreateOp
FirstOp() Operation
- // Lookup for the very last operation of the bug.
+ // LastOp lookup for the very last operation of the bug.
// For a valid Bug, should never be nil
LastOp() Operation
- // Compile a bug in a easily usable snapshot
- Compile() Snapshot
+ // Compile a bug in an easily usable snapshot
+ Compile() *Snapshot
// CreateLamportTime return the Lamport time of creation
CreateLamportTime() lamport.Time
@@ -42,14 +42,3 @@ type Interface interface {
// EditLamportTime return the Lamport time of the last edit
EditLamportTime() lamport.Time
}
-
-func bugFromInterface(bug Interface) *Bug {
- switch bug := bug.(type) {
- case *Bug:
- return bug
- case *WithSnapshot:
- return bug.Bug
- default:
- panic("missing type case")
- }
-}
diff --git a/bug/op_add_comment.go b/bug/op_add_comment.go
index 8eb937cf..eddd585a 100644
--- a/bug/op_add_comment.go
+++ b/bug/op_add_comment.go
@@ -1,7 +1,6 @@
package bug
import (
- "encoding/json"
"fmt"
"github.com/MichaelMure/git-bug/entity"
@@ -17,24 +16,24 @@ var _ dag.OperationWithFiles = &AddCommentOperation{}
// AddCommentOperation will add a new comment in the bug
type AddCommentOperation struct {
- OpBase
+ dag.OpBase
Message string `json:"message"`
// TODO: change for a map[string]util.hash to store the filename ?
Files []repository.Hash `json:"files"`
}
func (op *AddCommentOperation) Id() entity.Id {
- return idOperation(op, &op.OpBase)
+ return dag.IdOperation(op, &op.OpBase)
}
func (op *AddCommentOperation) Apply(snapshot *Snapshot) {
- snapshot.addActor(op.Author_)
- snapshot.addParticipant(op.Author_)
+ snapshot.addActor(op.Author())
+ snapshot.addParticipant(op.Author())
comment := Comment{
id: entity.CombineIds(snapshot.Id(), op.Id()),
Message: op.Message,
- Author: op.Author_,
+ Author: op.Author(),
Files: op.Files,
UnixTime: timestamp.Timestamp(op.UnixTime),
}
@@ -64,64 +63,31 @@ func (op *AddCommentOperation) Validate() error {
return nil
}
-// UnmarshalJSON is a two-steps JSON unmarshalling
-// This workaround is necessary to avoid the inner OpBase.MarshalJSON
-// overriding the outer op's MarshalJSON
-func (op *AddCommentOperation) UnmarshalJSON(data []byte) error {
- // Unmarshal OpBase and the op separately
-
- base := OpBase{}
- err := json.Unmarshal(data, &base)
- if err != nil {
- return err
- }
-
- aux := struct {
- Message string `json:"message"`
- Files []repository.Hash `json:"files"`
- }{}
-
- err = json.Unmarshal(data, &aux)
- if err != nil {
- return err
- }
-
- op.OpBase = base
- op.Message = aux.Message
- op.Files = aux.Files
-
- return nil
-}
-
-// Sign post method for gqlgen
-func (op *AddCommentOperation) IsAuthored() {}
-
func NewAddCommentOp(author identity.Interface, unixTime int64, message string, files []repository.Hash) *AddCommentOperation {
return &AddCommentOperation{
- OpBase: newOpBase(AddCommentOp, author, unixTime),
+ OpBase: dag.NewOpBase(AddCommentOp, author, unixTime),
Message: message,
Files: files,
}
}
-// CreateTimelineItem replace a AddComment operation in the Timeline and hold its edition history
+// AddCommentTimelineItem hold a comment in the timeline
type AddCommentTimelineItem struct {
CommentTimelineItem
}
-// Sign post method for gqlgen
+// IsAuthored is a sign post method for gqlgen
func (a *AddCommentTimelineItem) IsAuthored() {}
-// Convenience function to apply the operation
-func AddComment(b Interface, author identity.Interface, unixTime int64, message string) (*AddCommentOperation, error) {
- return AddCommentWithFiles(b, author, unixTime, message, nil)
-}
-
-func AddCommentWithFiles(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash) (*AddCommentOperation, error) {
- addCommentOp := NewAddCommentOp(author, unixTime, message, files)
- if err := addCommentOp.Validate(); err != nil {
+// AddComment is a convenience function to add a comment to a bug
+func AddComment(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (*AddCommentOperation, error) {
+ op := NewAddCommentOp(author, unixTime, message, files)
+ for key, val := range metadata {
+ op.SetMetadata(key, val)
+ }
+ if err := op.Validate(); err != nil {
return nil, err
}
- b.Append(addCommentOp)
- return addCommentOp, nil
+ b.Append(op)
+ return op, nil
}
diff --git a/bug/op_add_comment_test.go b/bug/op_add_comment_test.go
index 446bdb18..efdf7601 100644
--- a/bug/op_add_comment_test.go
+++ b/bug/op_add_comment_test.go
@@ -1,37 +1,18 @@
package bug
import (
- "encoding/json"
"testing"
- "time"
-
- "github.com/stretchr/testify/require"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
)
func TestAddCommentSerialize(t *testing.T) {
- repo := repository.NewMockRepo()
-
- rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
- require.NoError(t, err)
-
- unix := time.Now().Unix()
- before := NewAddCommentOp(rene, unix, "message", nil)
-
- data, err := json.Marshal(before)
- require.NoError(t, err)
-
- var after AddCommentOperation
- err = json.Unmarshal(data, &after)
- require.NoError(t, err)
-
- // enforce creating the ID
- before.Id()
-
- // Replace the identity as it's not serialized
- after.Author_ = rene
-
- require.Equal(t, before, &after)
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *AddCommentOperation {
+ return NewAddCommentOp(author, unixTime, "message", nil)
+ })
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *AddCommentOperation {
+ return NewAddCommentOp(author, unixTime, "message", []repository.Hash{"hash1", "hash2"})
+ })
}
diff --git a/bug/op_create.go b/bug/op_create.go
index 9c972195..ca4f3d8a 100644
--- a/bug/op_create.go
+++ b/bug/op_create.go
@@ -1,7 +1,6 @@
package bug
import (
- "encoding/json"
"fmt"
"github.com/MichaelMure/git-bug/entity"
@@ -17,53 +16,38 @@ var _ dag.OperationWithFiles = &CreateOperation{}
// CreateOperation define the initial creation of a bug
type CreateOperation struct {
- OpBase
+ dag.OpBase
Title string `json:"title"`
Message string `json:"message"`
Files []repository.Hash `json:"files"`
}
func (op *CreateOperation) Id() entity.Id {
- return idOperation(op, &op.OpBase)
-}
-
-// OVERRIDE
-func (op *CreateOperation) SetMetadata(key string, value string) {
- // sanity check: we make sure we are not in the following scenario:
- // - the bug is created with a first operation
- // - Id() is used
- // - metadata are added, which will change the Id
- // - Id() is used again
-
- if op.id != entity.UnsetId {
- panic("usage of Id() after changing the first operation")
- }
-
- op.OpBase.SetMetadata(key, value)
+ return dag.IdOperation(op, &op.OpBase)
}
func (op *CreateOperation) Apply(snapshot *Snapshot) {
// sanity check: will fail when adding a second Create
if snapshot.id != "" && snapshot.id != entity.UnsetId && snapshot.id != op.Id() {
- panic("adding a second Create operation")
+ return
}
snapshot.id = op.Id()
- snapshot.addActor(op.Author_)
- snapshot.addParticipant(op.Author_)
+ snapshot.addActor(op.Author())
+ snapshot.addParticipant(op.Author())
snapshot.Title = op.Title
comment := Comment{
id: entity.CombineIds(snapshot.Id(), op.Id()),
Message: op.Message,
- Author: op.Author_,
+ Author: op.Author(),
UnixTime: timestamp.Timestamp(op.UnixTime),
}
snapshot.Comments = []Comment{comment}
- snapshot.Author = op.Author_
+ snapshot.Author = op.Author()
snapshot.CreateTime = op.Time()
snapshot.Timeline = []TimelineItem{
@@ -82,13 +66,6 @@ func (op *CreateOperation) Validate() error {
return err
}
- if len(op.Nonce) > 64 {
- return fmt.Errorf("create nonce is too big")
- }
- if len(op.Nonce) < 20 {
- return fmt.Errorf("create nonce is too small")
- }
-
if text.Empty(op.Title) {
return fmt.Errorf("title is empty")
}
@@ -103,45 +80,9 @@ func (op *CreateOperation) Validate() error {
return nil
}
-// UnmarshalJSON is a two step JSON unmarshalling
-// This workaround is necessary to avoid the inner OpBase.MarshalJSON
-// overriding the outer op's MarshalJSON
-func (op *CreateOperation) UnmarshalJSON(data []byte) error {
- // Unmarshal OpBase and the op separately
-
- base := OpBase{}
- err := json.Unmarshal(data, &base)
- if err != nil {
- return err
- }
-
- aux := struct {
- Nonce []byte `json:"nonce"`
- Title string `json:"title"`
- Message string `json:"message"`
- Files []repository.Hash `json:"files"`
- }{}
-
- err = json.Unmarshal(data, &aux)
- if err != nil {
- return err
- }
-
- op.OpBase = base
- op.Nonce = aux.Nonce
- op.Title = aux.Title
- op.Message = aux.Message
- op.Files = aux.Files
-
- return nil
-}
-
-// Sign post method for gqlgen
-func (op *CreateOperation) IsAuthored() {}
-
func NewCreateOp(author identity.Interface, unixTime int64, title, message string, files []repository.Hash) *CreateOperation {
return &CreateOperation{
- OpBase: newOpBase(CreateOp, author, unixTime),
+ OpBase: dag.NewOpBase(CreateOp, author, unixTime),
Title: title,
Message: message,
Files: files,
@@ -153,23 +94,19 @@ type CreateTimelineItem struct {
CommentTimelineItem
}
-// Sign post method for gqlgen
+// IsAuthored is a sign post method for gqlgen
func (c *CreateTimelineItem) IsAuthored() {}
-// Convenience function to apply the operation
-func Create(author identity.Interface, unixTime int64, title, message string) (*Bug, *CreateOperation, error) {
- return CreateWithFiles(author, unixTime, title, message, nil)
-}
-
-func CreateWithFiles(author identity.Interface, unixTime int64, title, message string, files []repository.Hash) (*Bug, *CreateOperation, error) {
- newBug := NewBug()
- createOp := NewCreateOp(author, unixTime, title, message, files)
-
- if err := createOp.Validate(); err != nil {
- return nil, createOp, err
+// Create is a convenience function to create a bug
+func Create(author identity.Interface, unixTime int64, title, message string, files []repository.Hash, metadata map[string]string) (*Bug, *CreateOperation, error) {
+ b := NewBug()
+ op := NewCreateOp(author, unixTime, title, message, files)
+ for key, val := range metadata {
+ op.SetMetadata(key, val)
}
-
- newBug.Append(createOp)
-
- return newBug, createOp, nil
+ if err := op.Validate(); err != nil {
+ return nil, op, err
+ }
+ b.Append(op)
+ return b, op, nil
}
diff --git a/bug/op_create_test.go b/bug/op_create_test.go
index 7696d065..478bc9d4 100644
--- a/bug/op_create_test.go
+++ b/bug/op_create_test.go
@@ -1,13 +1,13 @@
package bug
import (
- "encoding/json"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
"github.com/MichaelMure/git-bug/util/timestamp"
@@ -58,26 +58,10 @@ func TestCreate(t *testing.T) {
}
func TestCreateSerialize(t *testing.T) {
- repo := repository.NewMockRepo()
-
- rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
- require.NoError(t, err)
-
- unix := time.Now().Unix()
- before := NewCreateOp(rene, unix, "title", "message", nil)
-
- data, err := json.Marshal(before)
- require.NoError(t, err)
-
- var after CreateOperation
- err = json.Unmarshal(data, &after)
- require.NoError(t, err)
-
- // enforce creating the ID
- before.Id()
-
- // Replace the identity as it's not serialized
- after.Author_ = rene
-
- require.Equal(t, before, &after)
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *CreateOperation {
+ return NewCreateOp(author, unixTime, "title", "message", nil)
+ })
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *CreateOperation {
+ return NewCreateOp(author, unixTime, "title", "message", []repository.Hash{"hash1", "hash2"})
+ })
}
diff --git a/bug/op_edit_comment.go b/bug/op_edit_comment.go
index 4740f37b..70a362de 100644
--- a/bug/op_edit_comment.go
+++ b/bug/op_edit_comment.go
@@ -1,7 +1,6 @@
package bug
import (
- "encoding/json"
"fmt"
"github.com/pkg/errors"
@@ -20,14 +19,14 @@ var _ dag.OperationWithFiles = &EditCommentOperation{}
// EditCommentOperation will change a comment in the bug
type EditCommentOperation struct {
- OpBase
+ dag.OpBase
Target entity.Id `json:"target"`
Message string `json:"message"`
Files []repository.Hash `json:"files"`
}
func (op *EditCommentOperation) Id() entity.Id {
- return idOperation(op, &op.OpBase)
+ return dag.IdOperation(op, &op.OpBase)
}
func (op *EditCommentOperation) Apply(snapshot *Snapshot) {
@@ -68,7 +67,7 @@ func (op *EditCommentOperation) Apply(snapshot *Snapshot) {
return
}
- snapshot.addActor(op.Author_)
+ snapshot.addActor(op.Author())
// Updating the corresponding comment
@@ -101,43 +100,9 @@ func (op *EditCommentOperation) Validate() error {
return nil
}
-// UnmarshalJSON is two steps JSON unmarshalling
-// This workaround is necessary to avoid the inner OpBase.MarshalJSON
-// overriding the outer op's MarshalJSON
-func (op *EditCommentOperation) UnmarshalJSON(data []byte) error {
- // Unmarshal OpBase and the op separately
-
- base := OpBase{}
- err := json.Unmarshal(data, &base)
- if err != nil {
- return err
- }
-
- aux := struct {
- Target entity.Id `json:"target"`
- Message string `json:"message"`
- Files []repository.Hash `json:"files"`
- }{}
-
- err = json.Unmarshal(data, &aux)
- if err != nil {
- return err
- }
-
- op.OpBase = base
- op.Target = aux.Target
- op.Message = aux.Message
- op.Files = aux.Files
-
- return nil
-}
-
-// Sign post method for gqlgen
-func (op *EditCommentOperation) IsAuthored() {}
-
func NewEditCommentOp(author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash) *EditCommentOperation {
return &EditCommentOperation{
- OpBase: newOpBase(EditCommentOp, author, unixTime),
+ OpBase: dag.NewOpBase(EditCommentOp, author, unixTime),
Target: target,
Message: message,
Files: files,
@@ -145,27 +110,20 @@ func NewEditCommentOp(author identity.Interface, unixTime int64, target entity.I
}
// EditComment is a convenience function to apply the operation
-func EditComment(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string) (*EditCommentOperation, error) {
- return EditCommentWithFiles(b, author, unixTime, target, message, nil)
-}
-
-func EditCommentWithFiles(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash) (*EditCommentOperation, error) {
- editCommentOp := NewEditCommentOp(author, unixTime, target, message, files)
- if err := editCommentOp.Validate(); err != nil {
+func EditComment(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash, metadata map[string]string) (*EditCommentOperation, error) {
+ op := NewEditCommentOp(author, unixTime, target, message, files)
+ for key, val := range metadata {
+ op.SetMetadata(key, val)
+ }
+ if err := op.Validate(); err != nil {
return nil, err
}
- b.Append(editCommentOp)
- return editCommentOp, nil
+ b.Append(op)
+ return op, nil
}
// EditCreateComment is a convenience function to edit the body of a bug (the first comment)
-func EditCreateComment(b Interface, author identity.Interface, unixTime int64, message string) (*EditCommentOperation, error) {
- createOp := b.FirstOp().(*CreateOperation)
- return EditComment(b, author, unixTime, createOp.Id(), message)
-}
-
-// EditCreateCommentWithFiles is a convenience function to edit the body of a bug (the first comment)
-func EditCreateCommentWithFiles(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash) (*EditCommentOperation, error) {
+func EditCreateComment(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (*EditCommentOperation, error) {
createOp := b.FirstOp().(*CreateOperation)
- return EditCommentWithFiles(b, author, unixTime, createOp.Id(), message, files)
+ return EditComment(b, author, unixTime, createOp.Id(), message, files, metadata)
}
diff --git a/bug/op_edit_comment_test.go b/bug/op_edit_comment_test.go
index 62034a0b..780483e4 100644
--- a/bug/op_edit_comment_test.go
+++ b/bug/op_edit_comment_test.go
@@ -1,12 +1,12 @@
package bug
import (
- "encoding/json"
"testing"
"time"
"github.com/stretchr/testify/require"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
)
@@ -75,26 +75,10 @@ func TestEdit(t *testing.T) {
}
func TestEditCommentSerialize(t *testing.T) {
- repo := repository.NewMockRepo()
-
- rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
- require.NoError(t, err)
-
- unix := time.Now().Unix()
- before := NewEditCommentOp(rene, unix, "target", "message", nil)
-
- data, err := json.Marshal(before)
- require.NoError(t, err)
-
- var after EditCommentOperation
- err = json.Unmarshal(data, &after)
- require.NoError(t, err)
-
- // enforce creating the ID
- before.Id()
-
- // Replace the identity as it's not serialized
- after.Author_ = rene
-
- require.Equal(t, before, &after)
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *EditCommentOperation {
+ return NewEditCommentOp(author, unixTime, "target", "message", nil)
+ })
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *EditCommentOperation {
+ return NewEditCommentOp(author, unixTime, "target", "message", []repository.Hash{"hash1", "hash2"})
+ })
}
diff --git a/bug/op_label_change.go b/bug/op_label_change.go
index 8b0e5ec8..8bcc7853 100644
--- a/bug/op_label_change.go
+++ b/bug/op_label_change.go
@@ -1,13 +1,13 @@
package bug
import (
- "encoding/json"
"fmt"
"sort"
"github.com/pkg/errors"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/util/timestamp"
)
@@ -16,18 +16,18 @@ var _ Operation = &LabelChangeOperation{}
// LabelChangeOperation define a Bug operation to add or remove labels
type LabelChangeOperation struct {
- OpBase
+ dag.OpBase
Added []Label `json:"added"`
Removed []Label `json:"removed"`
}
func (op *LabelChangeOperation) Id() entity.Id {
- return idOperation(op, &op.OpBase)
+ return dag.IdOperation(op, &op.OpBase)
}
-// Apply apply the operation
+// Apply applies the operation
func (op *LabelChangeOperation) Apply(snapshot *Snapshot) {
- snapshot.addActor(op.Author_)
+ snapshot.addActor(op.Author())
// Add in the set
AddLoop:
@@ -59,7 +59,7 @@ AddLoop:
item := &LabelChangeTimelineItem{
id: op.Id(),
- Author: op.Author_,
+ Author: op.Author(),
UnixTime: timestamp.Timestamp(op.UnixTime),
Added: op.Added,
Removed: op.Removed,
@@ -92,41 +92,9 @@ func (op *LabelChangeOperation) Validate() error {
return nil
}
-// UnmarshalJSON is a two step JSON unmarshalling
-// This workaround is necessary to avoid the inner OpBase.MarshalJSON
-// overriding the outer op's MarshalJSON
-func (op *LabelChangeOperation) UnmarshalJSON(data []byte) error {
- // Unmarshal OpBase and the op separately
-
- base := OpBase{}
- err := json.Unmarshal(data, &base)
- if err != nil {
- return err
- }
-
- aux := struct {
- Added []Label `json:"added"`
- Removed []Label `json:"removed"`
- }{}
-
- err = json.Unmarshal(data, &aux)
- if err != nil {
- return err
- }
-
- op.OpBase = base
- op.Added = aux.Added
- op.Removed = aux.Removed
-
- return nil
-}
-
-// Sign post method for gqlgen
-func (op *LabelChangeOperation) IsAuthored() {}
-
func NewLabelChangeOperation(author identity.Interface, unixTime int64, added, removed []Label) *LabelChangeOperation {
return &LabelChangeOperation{
- OpBase: newOpBase(LabelChangeOp, author, unixTime),
+ OpBase: dag.NewOpBase(LabelChangeOp, author, unixTime),
Added: added,
Removed: removed,
}
@@ -144,11 +112,11 @@ func (l LabelChangeTimelineItem) Id() entity.Id {
return l.id
}
-// Sign post method for gqlgen
-func (l *LabelChangeTimelineItem) IsAuthored() {}
+// IsAuthored is a sign post method for gqlgen
+func (l LabelChangeTimelineItem) IsAuthored() {}
-// ChangeLabels is a convenience function to apply the operation
-func ChangeLabels(b Interface, author identity.Interface, unixTime int64, add, remove []string) ([]LabelChangeResult, *LabelChangeOperation, error) {
+// ChangeLabels is a convenience function to change labels on a bug
+func ChangeLabels(b Interface, author identity.Interface, unixTime int64, add, remove []string, metadata map[string]string) ([]LabelChangeResult, *LabelChangeOperation, error) {
var added, removed []Label
var results []LabelChangeResult
@@ -196,23 +164,25 @@ func ChangeLabels(b Interface, author identity.Interface, unixTime int64, add, r
return results, nil, fmt.Errorf("no label added or removed")
}
- labelOp := NewLabelChangeOperation(author, unixTime, added, removed)
-
- if err := labelOp.Validate(); err != nil {
+ op := NewLabelChangeOperation(author, unixTime, added, removed)
+ for key, val := range metadata {
+ op.SetMetadata(key, val)
+ }
+ if err := op.Validate(); err != nil {
return nil, nil, err
}
- b.Append(labelOp)
+ b.Append(op)
- return results, labelOp, nil
+ return results, op, nil
}
// ForceChangeLabels is a convenience function to apply the operation
// The difference with ChangeLabels is that no checks of deduplications are done. You are entirely
-// responsible of what you are doing. In the general case, you want to use ChangeLabels instead.
+// responsible for what you are doing. In the general case, you want to use ChangeLabels instead.
// The intended use of this function is to allow importers to create legal but unexpected label changes,
// like removing a label with no information of when it was added before.
-func ForceChangeLabels(b Interface, author identity.Interface, unixTime int64, add, remove []string) (*LabelChangeOperation, error) {
+func ForceChangeLabels(b Interface, author identity.Interface, unixTime int64, add, remove []string, metadata map[string]string) (*LabelChangeOperation, error) {
added := make([]Label, len(add))
for i, str := range add {
added[i] = Label(str)
@@ -223,15 +193,18 @@ func ForceChangeLabels(b Interface, author identity.Interface, unixTime int64, a
removed[i] = Label(str)
}
- labelOp := NewLabelChangeOperation(author, unixTime, added, removed)
+ op := NewLabelChangeOperation(author, unixTime, added, removed)
- if err := labelOp.Validate(); err != nil {
+ for key, val := range metadata {
+ op.SetMetadata(key, val)
+ }
+ if err := op.Validate(); err != nil {
return nil, err
}
- b.Append(labelOp)
+ b.Append(op)
- return labelOp, nil
+ return op, nil
}
func labelExist(labels []Label, label Label) bool {
diff --git a/bug/op_label_change_test.go b/bug/op_label_change_test.go
index 1892724e..2c1d8f62 100644
--- a/bug/op_label_change_test.go
+++ b/bug/op_label_change_test.go
@@ -1,37 +1,20 @@
package bug
import (
- "encoding/json"
"testing"
- "time"
-
- "github.com/stretchr/testify/require"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
- "github.com/MichaelMure/git-bug/repository"
)
func TestLabelChangeSerialize(t *testing.T) {
- repo := repository.NewMockRepo()
-
- rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
- require.NoError(t, err)
-
- unix := time.Now().Unix()
- before := NewLabelChangeOperation(rene, unix, []Label{"added"}, []Label{"removed"})
-
- data, err := json.Marshal(before)
- require.NoError(t, err)
-
- var after LabelChangeOperation
- err = json.Unmarshal(data, &after)
- require.NoError(t, err)
-
- // enforce creating the ID
- before.Id()
-
- // Replace the identity as it's not serialized
- after.Author_ = rene
-
- require.Equal(t, before, &after)
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation {
+ return NewLabelChangeOperation(author, unixTime, []Label{"added"}, []Label{"removed"})
+ })
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation {
+ return NewLabelChangeOperation(author, unixTime, []Label{"added"}, nil)
+ })
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation {
+ return NewLabelChangeOperation(author, unixTime, nil, []Label{"removed"})
+ })
}
diff --git a/bug/op_noop.go b/bug/op_noop.go
deleted file mode 100644
index 1b11e694..00000000
--- a/bug/op_noop.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package bug
-
-import (
- "encoding/json"
-
- "github.com/MichaelMure/git-bug/entity"
- "github.com/MichaelMure/git-bug/identity"
-)
-
-var _ Operation = &NoOpOperation{}
-
-// NoOpOperation is an operation that does not change the bug state. It can
-// however be used to store arbitrary metadata in the bug history, for example
-// to support a bridge feature.
-type NoOpOperation struct {
- OpBase
-}
-
-func (op *NoOpOperation) Id() entity.Id {
- return idOperation(op, &op.OpBase)
-}
-
-func (op *NoOpOperation) Apply(snapshot *Snapshot) {
- // Nothing to do
-}
-
-func (op *NoOpOperation) Validate() error {
- return op.OpBase.Validate(op, NoOpOp)
-}
-
-// UnmarshalJSON is a two step JSON unmarshalling
-// This workaround is necessary to avoid the inner OpBase.MarshalJSON
-// overriding the outer op's MarshalJSON
-func (op *NoOpOperation) UnmarshalJSON(data []byte) error {
- // Unmarshal OpBase and the op separately
-
- base := OpBase{}
- err := json.Unmarshal(data, &base)
- if err != nil {
- return err
- }
-
- aux := struct{}{}
-
- err = json.Unmarshal(data, &aux)
- if err != nil {
- return err
- }
-
- op.OpBase = base
-
- return nil
-}
-
-// Sign post method for gqlgen
-func (op *NoOpOperation) IsAuthored() {}
-
-func NewNoOpOp(author identity.Interface, unixTime int64) *NoOpOperation {
- return &NoOpOperation{
- OpBase: newOpBase(NoOpOp, author, unixTime),
- }
-}
-
-// Convenience function to apply the operation
-func NoOp(b Interface, author identity.Interface, unixTime int64, metadata map[string]string) (*NoOpOperation, error) {
- op := NewNoOpOp(author, unixTime)
-
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
- if err := op.Validate(); err != nil {
- return nil, err
- }
- b.Append(op)
- return op, nil
-}
diff --git a/bug/op_noop_test.go b/bug/op_noop_test.go
deleted file mode 100644
index 2bbfa219..00000000
--- a/bug/op_noop_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package bug
-
-import (
- "encoding/json"
- "testing"
- "time"
-
- "github.com/stretchr/testify/require"
-
- "github.com/MichaelMure/git-bug/identity"
- "github.com/MichaelMure/git-bug/repository"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestNoopSerialize(t *testing.T) {
- repo := repository.NewMockRepo()
-
- rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
- require.NoError(t, err)
-
- unix := time.Now().Unix()
- before := NewNoOpOp(rene, unix)
-
- data, err := json.Marshal(before)
- assert.NoError(t, err)
-
- var after NoOpOperation
- err = json.Unmarshal(data, &after)
- assert.NoError(t, err)
-
- // enforce creating the ID
- before.Id()
-
- // Replace the identity as it's not serialized
- after.Author_ = rene
-
- assert.Equal(t, before, &after)
-}
diff --git a/bug/op_set_metadata.go b/bug/op_set_metadata.go
index 28496fd8..08e1887b 100644
--- a/bug/op_set_metadata.go
+++ b/bug/op_set_metadata.go
@@ -1,108 +1,21 @@
package bug
import (
- "encoding/json"
- "fmt"
-
- "github.com/pkg/errors"
-
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
- "github.com/MichaelMure/git-bug/util/text"
)
-var _ Operation = &SetMetadataOperation{}
-
-type SetMetadataOperation struct {
- OpBase
- Target entity.Id `json:"target"`
- NewMetadata map[string]string `json:"new_metadata"`
-}
-
-func (op *SetMetadataOperation) Id() entity.Id {
- return idOperation(op, &op.OpBase)
-}
-
-func (op *SetMetadataOperation) Apply(snapshot *Snapshot) {
- for _, target := range snapshot.Operations {
- if target.Id() == op.Target {
- // Apply the metadata in an immutable way: if a metadata already
- // exist, it's not possible to override it.
- for key, value := range op.NewMetadata {
- target.setExtraMetadataImmutable(key, value)
- }
- return
- }
- }
-}
-
-func (op *SetMetadataOperation) Validate() error {
- if err := op.OpBase.Validate(op, SetMetadataOp); err != nil {
- return err
- }
-
- if err := op.Target.Validate(); err != nil {
- return errors.Wrap(err, "target invalid")
- }
-
- for key, val := range op.NewMetadata {
- if !text.SafeOneLine(key) {
- return fmt.Errorf("metadata key is unsafe")
- }
- if !text.Safe(val) {
- return fmt.Errorf("metadata value is not fully printable")
- }
- }
-
- return nil
-}
-
-// UnmarshalJSON is a two step JSON unmarshalling
-// This workaround is necessary to avoid the inner OpBase.MarshalJSON
-// overriding the outer op's MarshalJSON
-func (op *SetMetadataOperation) UnmarshalJSON(data []byte) error {
- // Unmarshal OpBase and the op separately
-
- base := OpBase{}
- err := json.Unmarshal(data, &base)
- if err != nil {
- return err
- }
-
- aux := struct {
- Target entity.Id `json:"target"`
- NewMetadata map[string]string `json:"new_metadata"`
- }{}
-
- err = json.Unmarshal(data, &aux)
- if err != nil {
- return err
- }
-
- op.OpBase = base
- op.Target = aux.Target
- op.NewMetadata = aux.NewMetadata
-
- return nil
-}
-
-// Sign post method for gqlgen
-func (op *SetMetadataOperation) IsAuthored() {}
-
-func NewSetMetadataOp(author identity.Interface, unixTime int64, target entity.Id, newMetadata map[string]string) *SetMetadataOperation {
- return &SetMetadataOperation{
- OpBase: newOpBase(SetMetadataOp, author, unixTime),
- Target: target,
- NewMetadata: newMetadata,
- }
+func NewSetMetadataOp(author identity.Interface, unixTime int64, target entity.Id, newMetadata map[string]string) *dag.SetMetadataOperation[*Snapshot] {
+ return dag.NewSetMetadataOp[*Snapshot](SetMetadataOp, author, unixTime, target, newMetadata)
}
-// Convenience function to apply the operation
-func SetMetadata(b Interface, author identity.Interface, unixTime int64, target entity.Id, newMetadata map[string]string) (*SetMetadataOperation, error) {
- SetMetadataOp := NewSetMetadataOp(author, unixTime, target, newMetadata)
- if err := SetMetadataOp.Validate(); err != nil {
+// SetMetadata is a convenience function to add metadata on another operation
+func SetMetadata(b Interface, author identity.Interface, unixTime int64, target entity.Id, newMetadata map[string]string) (*dag.SetMetadataOperation[*Snapshot], error) {
+ op := NewSetMetadataOp(author, unixTime, target, newMetadata)
+ if err := op.Validate(); err != nil {
return nil, err
}
- b.Append(SetMetadataOp)
- return SetMetadataOp, nil
+ b.Append(op)
+ return op, nil
}
diff --git a/bug/op_set_metadata_test.go b/bug/op_set_metadata_test.go
deleted file mode 100644
index 62c1c942..00000000
--- a/bug/op_set_metadata_test.go
+++ /dev/null
@@ -1,126 +0,0 @@
-package bug
-
-import (
- "encoding/json"
- "testing"
- "time"
-
- "github.com/MichaelMure/git-bug/identity"
- "github.com/MichaelMure/git-bug/repository"
-
- "github.com/stretchr/testify/require"
-)
-
-func TestSetMetadata(t *testing.T) {
- snapshot := Snapshot{}
-
- repo := repository.NewMockRepo()
-
- rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
- require.NoError(t, err)
-
- unix := time.Now().Unix()
-
- create := NewCreateOp(rene, unix, "title", "create", nil)
- create.SetMetadata("key", "value")
- create.Apply(&snapshot)
- snapshot.Operations = append(snapshot.Operations, create)
-
- id1 := create.Id()
- require.NoError(t, id1.Validate())
-
- comment := NewAddCommentOp(rene, unix, "comment", nil)
- comment.SetMetadata("key2", "value2")
- comment.Apply(&snapshot)
- snapshot.Operations = append(snapshot.Operations, comment)
-
- id2 := comment.Id()
- require.NoError(t, id2.Validate())
-
- op1 := NewSetMetadataOp(rene, unix, id1, map[string]string{
- "key": "override",
- "key2": "value",
- })
-
- op1.Apply(&snapshot)
- snapshot.Operations = append(snapshot.Operations, op1)
-
- createMetadata := snapshot.Operations[0].AllMetadata()
- require.Len(t, createMetadata, 2)
- // original key is not overrided
- require.Equal(t, createMetadata["key"], "value")
- // new key is set
- require.Equal(t, createMetadata["key2"], "value")
-
- commentMetadata := snapshot.Operations[1].AllMetadata()
- require.Len(t, commentMetadata, 1)
- require.Equal(t, commentMetadata["key2"], "value2")
-
- op2 := NewSetMetadataOp(rene, unix, id2, map[string]string{
- "key2": "value",
- "key3": "value3",
- })
-
- op2.Apply(&snapshot)
- snapshot.Operations = append(snapshot.Operations, op2)
-
- createMetadata = snapshot.Operations[0].AllMetadata()
- require.Len(t, createMetadata, 2)
- require.Equal(t, createMetadata["key"], "value")
- require.Equal(t, createMetadata["key2"], "value")
-
- commentMetadata = snapshot.Operations[1].AllMetadata()
- require.Len(t, commentMetadata, 2)
- // original key is not overrided
- require.Equal(t, commentMetadata["key2"], "value2")
- // new key is set
- require.Equal(t, commentMetadata["key3"], "value3")
-
- op3 := NewSetMetadataOp(rene, unix, id1, map[string]string{
- "key": "override",
- "key2": "override",
- })
-
- op3.Apply(&snapshot)
- snapshot.Operations = append(snapshot.Operations, op3)
-
- createMetadata = snapshot.Operations[0].AllMetadata()
- require.Len(t, createMetadata, 2)
- // original key is not overrided
- require.Equal(t, createMetadata["key"], "value")
- // previously set key is not overrided
- require.Equal(t, createMetadata["key2"], "value")
-
- commentMetadata = snapshot.Operations[1].AllMetadata()
- require.Len(t, commentMetadata, 2)
- require.Equal(t, commentMetadata["key2"], "value2")
- require.Equal(t, commentMetadata["key3"], "value3")
-}
-
-func TestSetMetadataSerialize(t *testing.T) {
- repo := repository.NewMockRepo()
-
- rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
- require.NoError(t, err)
-
- unix := time.Now().Unix()
- before := NewSetMetadataOp(rene, unix, "message", map[string]string{
- "key1": "value1",
- "key2": "value2",
- })
-
- data, err := json.Marshal(before)
- require.NoError(t, err)
-
- var after SetMetadataOperation
- err = json.Unmarshal(data, &after)
- require.NoError(t, err)
-
- // enforce creating the ID
- before.Id()
-
- // Replace the identity as it's not serialized
- after.Author_ = rene
-
- require.Equal(t, before, &after)
-}
diff --git a/bug/op_set_status.go b/bug/op_set_status.go
index e22ded54..ff8df75d 100644
--- a/bug/op_set_status.go
+++ b/bug/op_set_status.go
@@ -1,11 +1,10 @@
package bug
import (
- "encoding/json"
-
"github.com/pkg/errors"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/util/timestamp"
)
@@ -14,21 +13,21 @@ var _ Operation = &SetStatusOperation{}
// SetStatusOperation will change the status of a bug
type SetStatusOperation struct {
- OpBase
+ dag.OpBase
Status Status `json:"status"`
}
func (op *SetStatusOperation) Id() entity.Id {
- return idOperation(op, &op.OpBase)
+ return dag.IdOperation(op, &op.OpBase)
}
func (op *SetStatusOperation) Apply(snapshot *Snapshot) {
snapshot.Status = op.Status
- snapshot.addActor(op.Author_)
+ snapshot.addActor(op.Author())
item := &SetStatusTimelineItem{
id: op.Id(),
- Author: op.Author_,
+ Author: op.Author(),
UnixTime: timestamp.Timestamp(op.UnixTime),
Status: op.Status,
}
@@ -48,39 +47,9 @@ func (op *SetStatusOperation) Validate() error {
return nil
}
-// UnmarshalJSON is a two step JSON unmarshalling
-// This workaround is necessary to avoid the inner OpBase.MarshalJSON
-// overriding the outer op's MarshalJSON
-func (op *SetStatusOperation) UnmarshalJSON(data []byte) error {
- // Unmarshal OpBase and the op separately
-
- base := OpBase{}
- err := json.Unmarshal(data, &base)
- if err != nil {
- return err
- }
-
- aux := struct {
- Status Status `json:"status"`
- }{}
-
- err = json.Unmarshal(data, &aux)
- if err != nil {
- return err
- }
-
- op.OpBase = base
- op.Status = aux.Status
-
- return nil
-}
-
-// Sign post method for gqlgen
-func (op *SetStatusOperation) IsAuthored() {}
-
func NewSetStatusOp(author identity.Interface, unixTime int64, status Status) *SetStatusOperation {
return &SetStatusOperation{
- OpBase: newOpBase(SetStatusOp, author, unixTime),
+ OpBase: dag.NewOpBase(SetStatusOp, author, unixTime),
Status: status,
}
}
@@ -96,12 +65,15 @@ func (s SetStatusTimelineItem) Id() entity.Id {
return s.id
}
-// Sign post method for gqlgen
-func (s *SetStatusTimelineItem) IsAuthored() {}
+// IsAuthored is a sign post method for gqlgen
+func (s SetStatusTimelineItem) IsAuthored() {}
-// Convenience function to apply the operation
-func Open(b Interface, author identity.Interface, unixTime int64) (*SetStatusOperation, error) {
+// Open is a convenience function to change a bugs state to Open
+func Open(b Interface, author identity.Interface, unixTime int64, metadata map[string]string) (*SetStatusOperation, error) {
op := NewSetStatusOp(author, unixTime, OpenStatus)
+ for key, value := range metadata {
+ op.SetMetadata(key, value)
+ }
if err := op.Validate(); err != nil {
return nil, err
}
@@ -109,9 +81,12 @@ func Open(b Interface, author identity.Interface, unixTime int64) (*SetStatusOpe
return op, nil
}
-// Convenience function to apply the operation
-func Close(b Interface, author identity.Interface, unixTime int64) (*SetStatusOperation, error) {
+// Close is a convenience function to change a bugs state to Close
+func Close(b Interface, author identity.Interface, unixTime int64, metadata map[string]string) (*SetStatusOperation, error) {
op := NewSetStatusOp(author, unixTime, ClosedStatus)
+ for key, value := range metadata {
+ op.SetMetadata(key, value)
+ }
if err := op.Validate(); err != nil {
return nil, err
}
diff --git a/bug/op_set_status_test.go b/bug/op_set_status_test.go
index 75cadae2..385deec1 100644
--- a/bug/op_set_status_test.go
+++ b/bug/op_set_status_test.go
@@ -1,37 +1,14 @@
package bug
import (
- "encoding/json"
"testing"
- "time"
-
- "github.com/stretchr/testify/require"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
- "github.com/MichaelMure/git-bug/repository"
)
func TestSetStatusSerialize(t *testing.T) {
- repo := repository.NewMockRepo()
-
- rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
- require.NoError(t, err)
-
- unix := time.Now().Unix()
- before := NewSetStatusOp(rene, unix, ClosedStatus)
-
- data, err := json.Marshal(before)
- require.NoError(t, err)
-
- var after SetStatusOperation
- err = json.Unmarshal(data, &after)
- require.NoError(t, err)
-
- // enforce creating the ID
- before.Id()
-
- // Replace the identity as it's not serialized
- after.Author_ = rene
-
- require.Equal(t, before, &after)
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *SetStatusOperation {
+ return NewSetStatusOp(author, unixTime, ClosedStatus)
+ })
}
diff --git a/bug/op_set_title.go b/bug/op_set_title.go
index badd192c..d26a60fa 100644
--- a/bug/op_set_title.go
+++ b/bug/op_set_title.go
@@ -1,10 +1,10 @@
package bug
import (
- "encoding/json"
"fmt"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/util/timestamp"
@@ -15,22 +15,22 @@ var _ Operation = &SetTitleOperation{}
// SetTitleOperation will change the title of a bug
type SetTitleOperation struct {
- OpBase
+ dag.OpBase
Title string `json:"title"`
Was string `json:"was"`
}
func (op *SetTitleOperation) Id() entity.Id {
- return idOperation(op, &op.OpBase)
+ return dag.IdOperation(op, &op.OpBase)
}
func (op *SetTitleOperation) Apply(snapshot *Snapshot) {
snapshot.Title = op.Title
- snapshot.addActor(op.Author_)
+ snapshot.addActor(op.Author())
item := &SetTitleTimelineItem{
id: op.Id(),
- Author: op.Author_,
+ Author: op.Author(),
UnixTime: timestamp.Timestamp(op.UnixTime),
Title: op.Title,
Was: op.Was,
@@ -59,41 +59,9 @@ func (op *SetTitleOperation) Validate() error {
return nil
}
-// UnmarshalJSON is a two step JSON unmarshalling
-// This workaround is necessary to avoid the inner OpBase.MarshalJSON
-// overriding the outer op's MarshalJSON
-func (op *SetTitleOperation) UnmarshalJSON(data []byte) error {
- // Unmarshal OpBase and the op separately
-
- base := OpBase{}
- err := json.Unmarshal(data, &base)
- if err != nil {
- return err
- }
-
- aux := struct {
- Title string `json:"title"`
- Was string `json:"was"`
- }{}
-
- err = json.Unmarshal(data, &aux)
- if err != nil {
- return err
- }
-
- op.OpBase = base
- op.Title = aux.Title
- op.Was = aux.Was
-
- return nil
-}
-
-// Sign post method for gqlgen
-func (op *SetTitleOperation) IsAuthored() {}
-
func NewSetTitleOp(author identity.Interface, unixTime int64, title string, was string) *SetTitleOperation {
return &SetTitleOperation{
- OpBase: newOpBase(SetTitleOp, author, unixTime),
+ OpBase: dag.NewOpBase(SetTitleOp, author, unixTime),
Title: title,
Was: was,
}
@@ -111,11 +79,11 @@ func (s SetTitleTimelineItem) Id() entity.Id {
return s.id
}
-// Sign post method for gqlgen
-func (s *SetTitleTimelineItem) IsAuthored() {}
+// IsAuthored is a sign post method for gqlgen
+func (s SetTitleTimelineItem) IsAuthored() {}
-// Convenience function to apply the operation
-func SetTitle(b Interface, author identity.Interface, unixTime int64, title string) (*SetTitleOperation, error) {
+// SetTitle is a convenience function to change a bugs title
+func SetTitle(b Interface, author identity.Interface, unixTime int64, title string, metadata map[string]string) (*SetTitleOperation, error) {
var lastTitleOp *SetTitleOperation
for _, op := range b.Operations() {
switch op := op.(type) {
@@ -131,12 +99,14 @@ func SetTitle(b Interface, author identity.Interface, unixTime int64, title stri
was = b.FirstOp().(*CreateOperation).Title
}
- setTitleOp := NewSetTitleOp(author, unixTime, title, was)
-
- if err := setTitleOp.Validate(); err != nil {
+ op := NewSetTitleOp(author, unixTime, title, was)
+ for key, value := range metadata {
+ op.SetMetadata(key, value)
+ }
+ if err := op.Validate(); err != nil {
return nil, err
}
- b.Append(setTitleOp)
- return setTitleOp, nil
+ b.Append(op)
+ return op, nil
}
diff --git a/bug/op_set_title_test.go b/bug/op_set_title_test.go
index 2a227709..8b45c74e 100644
--- a/bug/op_set_title_test.go
+++ b/bug/op_set_title_test.go
@@ -1,37 +1,14 @@
package bug
import (
- "encoding/json"
"testing"
- "time"
-
- "github.com/stretchr/testify/require"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
- "github.com/MichaelMure/git-bug/repository"
)
func TestSetTitleSerialize(t *testing.T) {
- repo := repository.NewMockRepo()
-
- rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
- require.NoError(t, err)
-
- unix := time.Now().Unix()
- before := NewSetTitleOp(rene, unix, "title", "was")
-
- data, err := json.Marshal(before)
- require.NoError(t, err)
-
- var after SetTitleOperation
- err = json.Unmarshal(data, &after)
- require.NoError(t, err)
-
- // enforce creating the ID
- before.Id()
-
- // Replace the identity as it's not serialized
- after.Author_ = rene
-
- require.Equal(t, before, &after)
+ dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *SetTitleOperation {
+ return NewSetTitleOp(author, unixTime, "title", "was")
+ })
}
diff --git a/bug/operation.go b/bug/operation.go
index b5c6b1de..9c87d8f3 100644
--- a/bug/operation.go
+++ b/bug/operation.go
@@ -1,23 +1,15 @@
package bug
import (
- "crypto/rand"
"encoding/json"
"fmt"
- "time"
- "github.com/pkg/errors"
-
- "github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
)
-// OperationType is an operation type identifier
-type OperationType int
-
const (
- _ OperationType = iota
+ _ dag.OperationType = iota
CreateOp
SetTitleOp
AddCommentOp
@@ -32,55 +24,24 @@ const (
type Operation interface {
dag.Operation
- // Type return the type of the operation
- Type() OperationType
-
- // Time return the time when the operation was added
- Time() time.Time
// Apply the operation to a Snapshot to create the final state
Apply(snapshot *Snapshot)
-
- // SetMetadata store arbitrary metadata about the operation
- SetMetadata(key string, value string)
- // GetMetadata retrieve arbitrary metadata about the operation
- GetMetadata(key string) (string, bool)
- // AllMetadata return all metadata for this operation
- AllMetadata() map[string]string
-
- setExtraMetadataImmutable(key string, value string)
}
-func idOperation(op Operation, base *OpBase) entity.Id {
- if base.id == "" {
- // something went really wrong
- panic("op's id not set")
- }
- if base.id == entity.UnsetId {
- // This means we are trying to get the op's Id *before* it has been stored, for instance when
- // adding multiple ops in one go in an OperationPack.
- // As the Id is computed based on the actual bytes written on the disk, we are going to predict
- // those and then get the Id. This is safe as it will be the exact same code writing on disk later.
-
- data, err := json.Marshal(op)
- if err != nil {
- panic(err)
- }
-
- base.id = entity.DeriveId(data)
- }
- return base.id
-}
+// make sure that package external operations do conform to our interface
+var _ Operation = &dag.NoOpOperation[*Snapshot]{}
+var _ Operation = &dag.SetMetadataOperation[*Snapshot]{}
-func operationUnmarshaller(author identity.Interface, raw json.RawMessage, resolver identity.Resolver) (dag.Operation, error) {
+func operationUnmarshaller(raw json.RawMessage, resolver identity.Resolver) (dag.Operation, error) {
var t struct {
- OperationType OperationType `json:"type"`
+ OperationType dag.OperationType `json:"type"`
}
if err := json.Unmarshal(raw, &t); err != nil {
return nil, err
}
- var op Operation
+ var op dag.Operation
switch t.OperationType {
case AddCommentOp:
@@ -92,9 +53,9 @@ func operationUnmarshaller(author identity.Interface, raw json.RawMessage, resol
case LabelChangeOp:
op = &LabelChangeOperation{}
case NoOpOp:
- op = &NoOpOperation{}
+ op = &dag.NoOpOperation[*Snapshot]{}
case SetMetadataOp:
- op = &SetMetadataOperation{}
+ op = &dag.SetMetadataOperation[*Snapshot]{}
case SetStatusOp:
op = &SetStatusOperation{}
case SetTitleOp:
@@ -108,188 +69,5 @@ func operationUnmarshaller(author identity.Interface, raw json.RawMessage, resol
return nil, err
}
- switch op := op.(type) {
- case *AddCommentOperation:
- op.Author_ = author
- case *CreateOperation:
- op.Author_ = author
- case *EditCommentOperation:
- op.Author_ = author
- case *LabelChangeOperation:
- op.Author_ = author
- case *NoOpOperation:
- op.Author_ = author
- case *SetMetadataOperation:
- op.Author_ = author
- case *SetStatusOperation:
- op.Author_ = author
- case *SetTitleOperation:
- op.Author_ = author
- default:
- panic(fmt.Sprintf("unknown operation type %T", op))
- }
-
return op, nil
}
-
-// OpBase implement the common code for all operations
-type OpBase struct {
- OperationType OperationType `json:"type"`
- Author_ identity.Interface `json:"-"` // not serialized
- // TODO: part of the data model upgrade, this should eventually be a timestamp + lamport
- UnixTime int64 `json:"timestamp"`
- Metadata map[string]string `json:"metadata,omitempty"`
-
- // mandatory random bytes to ensure a better randomness of the data used to later generate the ID
- // len(Nonce) should be > 20 and < 64 bytes
- // It has no functional purpose and should be ignored.
- Nonce []byte `json:"nonce"`
-
- // Not serialized. Store the op's id in memory.
- id entity.Id
- // Not serialized. Store the extra metadata in memory,
- // compiled from SetMetadataOperation.
- extraMetadata map[string]string
-}
-
-// newOpBase is the constructor for an OpBase
-func newOpBase(opType OperationType, author identity.Interface, unixTime int64) OpBase {
- return OpBase{
- OperationType: opType,
- Author_: author,
- UnixTime: unixTime,
- Nonce: makeNonce(20),
- id: entity.UnsetId,
- }
-}
-
-func makeNonce(len int) []byte {
- result := make([]byte, len)
- _, err := rand.Read(result)
- if err != nil {
- panic(err)
- }
- return result
-}
-
-func (base *OpBase) UnmarshalJSON(data []byte) error {
- // Compute the Id when loading the op from disk.
- base.id = entity.DeriveId(data)
-
- aux := struct {
- OperationType OperationType `json:"type"`
- UnixTime int64 `json:"timestamp"`
- Metadata map[string]string `json:"metadata,omitempty"`
- Nonce []byte `json:"nonce"`
- }{}
-
- if err := json.Unmarshal(data, &aux); err != nil {
- return err
- }
-
- base.OperationType = aux.OperationType
- base.UnixTime = aux.UnixTime
- base.Metadata = aux.Metadata
- base.Nonce = aux.Nonce
-
- return nil
-}
-
-func (base *OpBase) Type() OperationType {
- return base.OperationType
-}
-
-// Time return the time when the operation was added
-func (base *OpBase) Time() time.Time {
- return time.Unix(base.UnixTime, 0)
-}
-
-// Validate check the OpBase for errors
-func (base *OpBase) Validate(op Operation, opType OperationType) error {
- if base.OperationType != opType {
- return fmt.Errorf("incorrect operation type (expected: %v, actual: %v)", opType, base.OperationType)
- }
-
- if op.Time().Unix() == 0 {
- return fmt.Errorf("time not set")
- }
-
- if base.Author_ == nil {
- return fmt.Errorf("author not set")
- }
-
- if err := op.Author().Validate(); err != nil {
- return errors.Wrap(err, "author")
- }
-
- if op, ok := op.(dag.OperationWithFiles); ok {
- for _, hash := range op.GetFiles() {
- if !hash.IsValid() {
- return fmt.Errorf("file with invalid hash %v", hash)
- }
- }
- }
-
- if len(base.Nonce) > 64 {
- return fmt.Errorf("nonce is too big")
- }
- if len(base.Nonce) < 20 {
- return fmt.Errorf("nonce is too small")
- }
-
- return nil
-}
-
-// SetMetadata store arbitrary metadata about the operation
-func (base *OpBase) SetMetadata(key string, value string) {
- if base.Metadata == nil {
- base.Metadata = make(map[string]string)
- }
-
- base.Metadata[key] = value
- base.id = entity.UnsetId
-}
-
-// GetMetadata retrieve arbitrary metadata about the operation
-func (base *OpBase) GetMetadata(key string) (string, bool) {
- val, ok := base.Metadata[key]
-
- if ok {
- return val, true
- }
-
- // extraMetadata can't replace the original operations value if any
- val, ok = base.extraMetadata[key]
-
- return val, ok
-}
-
-// AllMetadata return all metadata for this operation
-func (base *OpBase) AllMetadata() map[string]string {
- result := make(map[string]string)
-
- for key, val := range base.extraMetadata {
- result[key] = val
- }
-
- // Original metadata take precedence
- for key, val := range base.Metadata {
- result[key] = val
- }
-
- return result
-}
-
-func (base *OpBase) setExtraMetadataImmutable(key string, value string) {
- if base.extraMetadata == nil {
- base.extraMetadata = make(map[string]string)
- }
- if _, exist := base.extraMetadata[key]; !exist {
- base.extraMetadata[key] = value
- }
-}
-
-// Author return author identity
-func (base *OpBase) Author() identity.Interface {
- return base.Author_
-}
diff --git a/bug/operation_test.go b/bug/operation_test.go
index c57a1591..3cfc85c4 100644
--- a/bug/operation_test.go
+++ b/bug/operation_test.go
@@ -6,10 +6,13 @@ import (
"github.com/stretchr/testify/require"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
)
+// TODO: move to entity/dag?
+
func TestValidate(t *testing.T) {
repo := repository.NewMockRepoClock()
@@ -44,11 +47,7 @@ func TestValidate(t *testing.T) {
NewSetStatusOp(makeIdentity(t, "René Descartes", "rene@descartes.fr\u001b"), unix, ClosedStatus),
NewSetStatusOp(makeIdentity(t, "René \nDescartes", "rene@descartes.fr"), unix, ClosedStatus),
NewSetStatusOp(makeIdentity(t, "René Descartes", "rene@\ndescartes.fr"), unix, ClosedStatus),
- &CreateOperation{OpBase: OpBase{
- Author_: rene,
- UnixTime: 0,
- OperationType: CreateOp,
- },
+ &CreateOperation{OpBase: dag.NewOpBase(CreateOp, rene, 0),
Title: "title",
Message: "message",
},
@@ -105,7 +104,7 @@ func TestID(t *testing.T) {
err = rene.Commit(repo)
require.NoError(t, err)
- b, op, err := Create(rene, time.Now().Unix(), "title", "message")
+ b, op, err := Create(rene, time.Now().Unix(), "title", "message", nil, nil)
require.NoError(t, err)
id1 := op.Id()
diff --git a/bug/snapshot.go b/bug/snapshot.go
index d73e4bb6..2efc067e 100644
--- a/bug/snapshot.go
+++ b/bug/snapshot.go
@@ -5,9 +5,12 @@ import (
"time"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
)
+var _ dag.Snapshot = &Snapshot{}
+
// Snapshot is a compiled form of the Bug data structure used for storage and merge
type Snapshot struct {
id entity.Id
@@ -23,7 +26,7 @@ type Snapshot struct {
Timeline []TimelineItem
- Operations []Operation
+ Operations []dag.Operation
}
// Id returns the Bug identifier
@@ -35,6 +38,10 @@ func (snap *Snapshot) Id() entity.Id {
return snap.id
}
+func (snap *Snapshot) AllOperations() []dag.Operation {
+ return snap.Operations
+}
+
// EditTime returns the last time a bug was modified
func (snap *Snapshot) EditTime() time.Time {
if len(snap.Operations) == 0 {
@@ -133,5 +140,5 @@ func (snap *Snapshot) HasAnyActor(ids ...entity.Id) bool {
return false
}
-// Sign post method for gqlgen
+// IsAuthored is a sign post method for gqlgen
func (snap *Snapshot) IsAuthored() {}
diff --git a/bug/with_snapshot.go b/bug/with_snapshot.go
index 9b706d61..0474cac7 100644
--- a/bug/with_snapshot.go
+++ b/bug/with_snapshot.go
@@ -1,6 +1,8 @@
package bug
-import "github.com/MichaelMure/git-bug/repository"
+import (
+ "github.com/MichaelMure/git-bug/repository"
+)
var _ Interface = &WithSnapshot{}
@@ -10,11 +12,10 @@ type WithSnapshot struct {
snap *Snapshot
}
-// Snapshot return the current snapshot
-func (b *WithSnapshot) Snapshot() *Snapshot {
+func (b *WithSnapshot) Compile() *Snapshot {
if b.snap == nil {
snap := b.Bug.Compile()
- b.snap = &snap
+ b.snap = snap
}
return b.snap
}
diff --git a/cache/bug_cache.go b/cache/bug_cache.go
index 0e4611da..7503fc37 100644
--- a/cache/bug_cache.go
+++ b/cache/bug_cache.go
@@ -7,6 +7,7 @@ import (
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/repository"
)
@@ -33,7 +34,7 @@ func NewBugCache(repoCache *RepoCache, b *bug.Bug) *BugCache {
func (c *BugCache) Snapshot() *bug.Snapshot {
c.mu.RLock()
defer c.mu.RUnlock()
- return c.bug.Snapshot()
+ return c.bug.Compile()
}
func (c *BugCache) Id() entity.Id {
@@ -84,18 +85,11 @@ func (c *BugCache) AddCommentWithFiles(message string, files []repository.Hash)
func (c *BugCache) AddCommentRaw(author *IdentityCache, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (*bug.AddCommentOperation, error) {
c.mu.Lock()
- op, err := bug.AddCommentWithFiles(c.bug, author.Identity, unixTime, message, files)
+ op, err := bug.AddComment(c.bug, author, unixTime, message, files, metadata)
+ c.mu.Unlock()
if err != nil {
- c.mu.Unlock()
return nil, err
}
-
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
- c.mu.Unlock()
-
return op, c.notifyUpdated()
}
@@ -110,24 +104,12 @@ func (c *BugCache) ChangeLabels(added []string, removed []string) ([]bug.LabelCh
func (c *BugCache) ChangeLabelsRaw(author *IdentityCache, unixTime int64, added []string, removed []string, metadata map[string]string) ([]bug.LabelChangeResult, *bug.LabelChangeOperation, error) {
c.mu.Lock()
- changes, op, err := bug.ChangeLabels(c.bug, author.Identity, unixTime, added, removed)
- if err != nil {
- c.mu.Unlock()
- return changes, nil, err
- }
-
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
+ changes, op, err := bug.ChangeLabels(c.bug, author.Identity, unixTime, added, removed, metadata)
c.mu.Unlock()
-
- err = c.notifyUpdated()
if err != nil {
- return nil, nil, err
+ return changes, nil, err
}
-
- return changes, op, nil
+ return changes, op, c.notifyUpdated()
}
func (c *BugCache) ForceChangeLabels(added []string, removed []string) (*bug.LabelChangeOperation, error) {
@@ -141,23 +123,12 @@ func (c *BugCache) ForceChangeLabels(added []string, removed []string) (*bug.Lab
func (c *BugCache) ForceChangeLabelsRaw(author *IdentityCache, unixTime int64, added []string, removed []string, metadata map[string]string) (*bug.LabelChangeOperation, error) {
c.mu.Lock()
- op, err := bug.ForceChangeLabels(c.bug, author.Identity, unixTime, added, removed)
- if err != nil {
- c.mu.Unlock()
- return nil, err
- }
-
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
+ op, err := bug.ForceChangeLabels(c.bug, author.Identity, unixTime, added, removed, metadata)
c.mu.Unlock()
- err = c.notifyUpdated()
if err != nil {
return nil, err
}
-
- return op, nil
+ return op, c.notifyUpdated()
}
func (c *BugCache) Open() (*bug.SetStatusOperation, error) {
@@ -171,17 +142,11 @@ func (c *BugCache) Open() (*bug.SetStatusOperation, error) {
func (c *BugCache) OpenRaw(author *IdentityCache, unixTime int64, metadata map[string]string) (*bug.SetStatusOperation, error) {
c.mu.Lock()
- op, err := bug.Open(c.bug, author.Identity, unixTime)
+ op, err := bug.Open(c.bug, author.Identity, unixTime, metadata)
+ c.mu.Unlock()
if err != nil {
- c.mu.Unlock()
return nil, err
}
-
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
- c.mu.Unlock()
return op, c.notifyUpdated()
}
@@ -196,17 +161,11 @@ func (c *BugCache) Close() (*bug.SetStatusOperation, error) {
func (c *BugCache) CloseRaw(author *IdentityCache, unixTime int64, metadata map[string]string) (*bug.SetStatusOperation, error) {
c.mu.Lock()
- op, err := bug.Close(c.bug, author.Identity, unixTime)
+ op, err := bug.Close(c.bug, author.Identity, unixTime, metadata)
+ c.mu.Unlock()
if err != nil {
- c.mu.Unlock()
return nil, err
}
-
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
- c.mu.Unlock()
return op, c.notifyUpdated()
}
@@ -221,17 +180,11 @@ func (c *BugCache) SetTitle(title string) (*bug.SetTitleOperation, error) {
func (c *BugCache) SetTitleRaw(author *IdentityCache, unixTime int64, title string, metadata map[string]string) (*bug.SetTitleOperation, error) {
c.mu.Lock()
- op, err := bug.SetTitle(c.bug, author.Identity, unixTime, title)
+ op, err := bug.SetTitle(c.bug, author.Identity, unixTime, title, metadata)
+ c.mu.Unlock()
if err != nil {
- c.mu.Unlock()
return nil, err
}
-
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
- c.mu.Unlock()
return op, c.notifyUpdated()
}
@@ -248,17 +201,11 @@ func (c *BugCache) EditCreateComment(body string) (*bug.EditCommentOperation, er
// EditCreateCommentRaw is a convenience function to edit the body of a bug (the first comment)
func (c *BugCache) EditCreateCommentRaw(author *IdentityCache, unixTime int64, body string, metadata map[string]string) (*bug.EditCommentOperation, error) {
c.mu.Lock()
- op, err := bug.EditCreateComment(c.bug, author.Identity, unixTime, body)
+ op, err := bug.EditCreateComment(c.bug, author.Identity, unixTime, body, nil, metadata)
+ c.mu.Unlock()
if err != nil {
- c.mu.Unlock()
return nil, err
}
-
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
- c.mu.Unlock()
return op, c.notifyUpdated()
}
@@ -273,21 +220,15 @@ func (c *BugCache) EditComment(target entity.Id, message string) (*bug.EditComme
func (c *BugCache) EditCommentRaw(author *IdentityCache, unixTime int64, target entity.Id, message string, metadata map[string]string) (*bug.EditCommentOperation, error) {
c.mu.Lock()
- op, err := bug.EditComment(c.bug, author.Identity, unixTime, target, message)
+ op, err := bug.EditComment(c.bug, author.Identity, unixTime, target, message, nil, metadata)
+ c.mu.Unlock()
if err != nil {
- c.mu.Unlock()
return nil, err
}
-
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
- c.mu.Unlock()
return op, c.notifyUpdated()
}
-func (c *BugCache) SetMetadata(target entity.Id, newMetadata map[string]string) (*bug.SetMetadataOperation, error) {
+func (c *BugCache) SetMetadata(target entity.Id, newMetadata map[string]string) (*dag.SetMetadataOperation[*bug.Snapshot], error) {
author, err := c.repoCache.GetUserIdentity()
if err != nil {
return nil, err
@@ -296,15 +237,13 @@ func (c *BugCache) SetMetadata(target entity.Id, newMetadata map[string]string)
return c.SetMetadataRaw(author, time.Now().Unix(), target, newMetadata)
}
-func (c *BugCache) SetMetadataRaw(author *IdentityCache, unixTime int64, target entity.Id, newMetadata map[string]string) (*bug.SetMetadataOperation, error) {
+func (c *BugCache) SetMetadataRaw(author *IdentityCache, unixTime int64, target entity.Id, newMetadata map[string]string) (*dag.SetMetadataOperation[*bug.Snapshot], error) {
c.mu.Lock()
op, err := bug.SetMetadata(c.bug, author.Identity, unixTime, target, newMetadata)
+ c.mu.Unlock()
if err != nil {
- c.mu.Unlock()
return nil, err
}
-
- c.mu.Unlock()
return op, c.notifyUpdated()
}
diff --git a/cache/repo_cache.go b/cache/repo_cache.go
index 14d5f3db..53948331 100644
--- a/cache/repo_cache.go
+++ b/cache/repo_cache.go
@@ -209,9 +209,9 @@ func (c *RepoCache) buildCache() error {
}
snap := b.Bug.Compile()
- c.bugExcerpts[b.Bug.Id()] = NewBugExcerpt(b.Bug, &snap)
+ c.bugExcerpts[b.Bug.Id()] = NewBugExcerpt(b.Bug, snap)
- if err := c.addBugToSearchIndex(&snap); err != nil {
+ if err := c.addBugToSearchIndex(snap); err != nil {
return err
}
}
@@ -222,7 +222,7 @@ func (c *RepoCache) buildCache() error {
}
// repoIsAvailable check is the given repository is locked by a Cache.
-// Note: this is a smart function that will cleanup the lock file if the
+// Note: this is a smart function that will clean the lock file if the
// corresponding process is not there anymore.
// If no error is returned, the repo is free to edit.
func repoIsAvailable(repo repository.RepoStorage) error {
diff --git a/cache/repo_cache_bug.go b/cache/repo_cache_bug.go
index f8bf5a2f..6af9fc04 100644
--- a/cache/repo_cache_bug.go
+++ b/cache/repo_cache_bug.go
@@ -461,15 +461,11 @@ func (c *RepoCache) NewBugWithFiles(title string, message string, files []reposi
// well as metadata for the Create operation.
// The new bug is written in the repository (commit)
func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title string, message string, files []repository.Hash, metadata map[string]string) (*BugCache, *bug.CreateOperation, error) {
- b, op, err := bug.CreateWithFiles(author.Identity, unixTime, title, message, files)
+ b, op, err := bug.Create(author.Identity, unixTime, title, message, files, metadata)
if err != nil {
return nil, nil, err
}
- for key, value := range metadata {
- op.SetMetadata(key, value)
- }
-
err = b.Commit(c.repo)
if err != nil {
return nil, nil, err
diff --git a/cache/repo_cache_common.go b/cache/repo_cache_common.go
index e23315f9..66797e80 100644
--- a/cache/repo_cache_common.go
+++ b/cache/repo_cache_common.go
@@ -36,7 +36,7 @@ func (c *RepoCache) Keyring() repository.Keyring {
return c.repo.Keyring()
}
-// GetUserName returns the name the the user has used to configure git
+// GetUserName returns the name the user has used to configure git
func (c *RepoCache) GetUserName() (string, error) {
return c.repo.GetUserName()
}
@@ -131,7 +131,7 @@ func (c *RepoCache) MergeAll(remote string) <-chan entity.MergeResult {
b := result.Entity.(*bug.Bug)
snap := b.Compile()
c.muBug.Lock()
- c.bugExcerpts[result.Id] = NewBugExcerpt(b, &snap)
+ c.bugExcerpts[result.Id] = NewBugExcerpt(b, snap)
c.muBug.Unlock()
}
}
diff --git a/entity/dag/common_test.go b/entity/dag/common_test.go
index c2177683..774acba8 100644
--- a/entity/dag/common_test.go
+++ b/entity/dag/common_test.go
@@ -18,78 +18,73 @@ import (
Operations
*/
-type op1 struct {
- author identity.Interface
+const (
+ _ OperationType = iota
+ Op1
+ Op2
+)
- OperationType int `json:"type"`
- Field1 string `json:"field_1"`
- Files []repository.Hash `json:"files"`
+type op1 struct {
+ OpBase
+ Field1 string `json:"field_1"`
+ Files []repository.Hash `json:"files"`
}
func newOp1(author identity.Interface, field1 string, files ...repository.Hash) *op1 {
- return &op1{author: author, OperationType: 1, Field1: field1, Files: files}
+ return &op1{OpBase: NewOpBase(Op1, author, 0), Field1: field1, Files: files}
}
-func (o *op1) Id() entity.Id {
- data, _ := json.Marshal(o)
- return entity.DeriveId(data)
+func (op *op1) Id() entity.Id {
+ return IdOperation(op, &op.OpBase)
}
-func (o *op1) Validate() error { return nil }
+func (op *op1) Validate() error { return nil }
-func (o *op1) Author() identity.Interface {
- return o.author
-}
-
-func (o *op1) GetFiles() []repository.Hash {
- return o.Files
+func (op *op1) GetFiles() []repository.Hash {
+ return op.Files
}
type op2 struct {
- author identity.Interface
-
- OperationType int `json:"type"`
- Field2 string `json:"field_2"`
+ OpBase
+ Field2 string `json:"field_2"`
}
func newOp2(author identity.Interface, field2 string) *op2 {
- return &op2{author: author, OperationType: 2, Field2: field2}
+ return &op2{OpBase: NewOpBase(Op2, author, 0), Field2: field2}
}
-func (o *op2) Id() entity.Id {
- data, _ := json.Marshal(o)
- return entity.DeriveId(data)
+func (op *op2) Id() entity.Id {
+ return IdOperation(op, &op.OpBase)
}
-func (o *op2) Validate() error { return nil }
-
-func (o *op2) Author() identity.Interface {
- return o.author
-}
+func (op *op2) Validate() error { return nil }
-func unmarshaler(author identity.Interface, raw json.RawMessage, resolver identity.Resolver) (Operation, error) {
+func unmarshaler(raw json.RawMessage, resolver identity.Resolver) (Operation, error) {
var t struct {
- OperationType int `json:"type"`
+ OperationType OperationType `json:"type"`
}
if err := json.Unmarshal(raw, &t); err != nil {
return nil, err
}
+ var op Operation
+
switch t.OperationType {
- case 1:
- op := &op1{}
- err := json.Unmarshal(raw, &op)
- op.author = author
- return op, err
- case 2:
- op := &op2{}
- err := json.Unmarshal(raw, &op)
- op.author = author
- return op, err
+ case Op1:
+ op = &op1{}
+ case Op2:
+ op = &op2{}
default:
return nil, fmt.Errorf("unknown operation type %v", t.OperationType)
}
+
+ err := json.Unmarshal(raw, &op)
+ if err != nil {
+ return nil, err
+ }
+
+ return op, nil
}
/*
diff --git a/entity/dag/entity.go b/entity/dag/entity.go
index f3229b7e..4ccf0e0e 100644
--- a/entity/dag/entity.go
+++ b/entity/dag/entity.go
@@ -26,7 +26,7 @@ type Definition struct {
// the Namespace in git references (bugs, prs, ...)
Namespace string
// a function decoding a JSON message into an Operation
- OperationUnmarshaler func(author identity.Interface, raw json.RawMessage, resolver identity.Resolver) (Operation, error)
+ OperationUnmarshaler func(raw json.RawMessage, resolver identity.Resolver) (Operation, error)
// the expected format version number, that can be used for data migration/upgrade
FormatVersion uint
}
diff --git a/entity/dag/entity_test.go b/entity/dag/entity_test.go
index 6d621bbe..e399b6c7 100644
--- a/entity/dag/entity_test.go
+++ b/entity/dag/entity_test.go
@@ -50,6 +50,8 @@ func TestWriteReadMultipleAuthor(t *testing.T) {
}
func assertEqualEntities(t *testing.T, a, b *Entity) {
+ t.Helper()
+
// testify doesn't support comparing functions and systematically fail if they are not nil
// so we have to set them to nil temporarily
diff --git a/entity/dag/example_test.go b/entity/dag/example_test.go
index 5d4ea34d..94850bd9 100644
--- a/entity/dag/example_test.go
+++ b/entity/dag/example_test.go
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"os"
+ "time"
"github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/entity/dag"
@@ -64,10 +65,8 @@ type Operation interface {
Apply(snapshot *Snapshot)
}
-type OperationType int
-
const (
- _ OperationType = iota
+ _ dag.OperationType = iota
SetSignatureRequiredOp
AddAdministratorOp
RemoveAdministratorOp
@@ -75,37 +74,30 @@ const (
// SetSignatureRequired is an operation to set/unset if git signature are required.
type SetSignatureRequired struct {
- author identity.Interface
- OperationType OperationType `json:"type"`
- Value bool `json:"value"`
+ dag.OpBase
+ Value bool `json:"value"`
}
func NewSetSignatureRequired(author identity.Interface, value bool) *SetSignatureRequired {
- return &SetSignatureRequired{author: author, OperationType: SetSignatureRequiredOp, Value: value}
+ return &SetSignatureRequired{
+ OpBase: dag.NewOpBase(SetSignatureRequiredOp, author, time.Now().Unix()),
+ Value: value,
+ }
}
func (ssr *SetSignatureRequired) Id() entity.Id {
// the Id of the operation is the hash of the serialized data.
- // we could memorize the Id when deserializing, but that will do
- data, _ := json.Marshal(ssr)
- return entity.DeriveId(data)
+ return dag.IdOperation(ssr, &ssr.OpBase)
}
func (ssr *SetSignatureRequired) Validate() error {
- if ssr.author == nil {
- return fmt.Errorf("author not set")
- }
- return ssr.author.Validate()
-}
-
-func (ssr *SetSignatureRequired) Author() identity.Interface {
- return ssr.author
+ return ssr.OpBase.Validate(ssr, SetSignatureRequiredOp)
}
// Apply is the function that makes changes on the snapshot
func (ssr *SetSignatureRequired) Apply(snapshot *Snapshot) {
// check that we are allowed to change the config
- if _, ok := snapshot.Administrator[ssr.author]; !ok {
+ if _, ok := snapshot.Administrator[ssr.Author()]; !ok {
return
}
snapshot.SignatureRequired = ssr.Value
@@ -113,24 +105,20 @@ func (ssr *SetSignatureRequired) Apply(snapshot *Snapshot) {
// AddAdministrator is an operation to add a new administrator in the set
type AddAdministrator struct {
- author identity.Interface
- OperationType OperationType `json:"type"`
- ToAdd []identity.Interface `json:"to_add"`
-}
-
-// addAdministratorJson is a helper struct to deserialize identities with a concrete type.
-type addAdministratorJson struct {
- ToAdd []identity.IdentityStub `json:"to_add"`
+ dag.OpBase
+ ToAdd []identity.Interface `json:"to_add"`
}
func NewAddAdministratorOp(author identity.Interface, toAdd ...identity.Interface) *AddAdministrator {
- return &AddAdministrator{author: author, OperationType: AddAdministratorOp, ToAdd: toAdd}
+ return &AddAdministrator{
+ OpBase: dag.NewOpBase(AddAdministratorOp, author, time.Now().Unix()),
+ ToAdd: toAdd,
+ }
}
func (aa *AddAdministrator) Id() entity.Id {
- // we could memorize the Id when deserializing, but that will do
- data, _ := json.Marshal(aa)
- return entity.DeriveId(data)
+ // the Id of the operation is the hash of the serialized data.
+ return dag.IdOperation(aa, &aa.OpBase)
}
func (aa *AddAdministrator) Validate() error {
@@ -138,20 +126,13 @@ func (aa *AddAdministrator) Validate() error {
if len(aa.ToAdd) == 0 {
return fmt.Errorf("nothing to add")
}
- if aa.author == nil {
- return fmt.Errorf("author not set")
- }
- return aa.author.Validate()
-}
-
-func (aa *AddAdministrator) Author() identity.Interface {
- return aa.author
+ return aa.OpBase.Validate(aa, AddAdministratorOp)
}
// Apply is the function that makes changes on the snapshot
func (aa *AddAdministrator) Apply(snapshot *Snapshot) {
// check that we are allowed to change the config ... or if there is no admin yet
- if !snapshot.HasAdministrator(aa.author) && len(snapshot.Administrator) != 0 {
+ if !snapshot.HasAdministrator(aa.Author()) && len(snapshot.Administrator) != 0 {
return
}
for _, toAdd := range aa.ToAdd {
@@ -161,25 +142,20 @@ func (aa *AddAdministrator) Apply(snapshot *Snapshot) {
// RemoveAdministrator is an operation to remove an administrator from the set
type RemoveAdministrator struct {
- author identity.Interface
- OperationType OperationType `json:"type"`
- ToRemove []identity.Interface `json:"to_remove"`
-}
-
-// removeAdministratorJson is a helper struct to deserialize identities with a concrete type.
-type removeAdministratorJson struct {
+ dag.OpBase
ToRemove []identity.Interface `json:"to_remove"`
}
func NewRemoveAdministratorOp(author identity.Interface, toRemove ...identity.Interface) *RemoveAdministrator {
- return &RemoveAdministrator{author: author, OperationType: RemoveAdministratorOp, ToRemove: toRemove}
+ return &RemoveAdministrator{
+ OpBase: dag.NewOpBase(RemoveAdministratorOp, author, time.Now().Unix()),
+ ToRemove: toRemove,
+ }
}
func (ra *RemoveAdministrator) Id() entity.Id {
// the Id of the operation is the hash of the serialized data.
- // we could memorize the Id when deserializing, but that will do
- data, _ := json.Marshal(ra)
- return entity.DeriveId(data)
+ return dag.IdOperation(ra, &ra.OpBase)
}
func (ra *RemoveAdministrator) Validate() error {
@@ -188,26 +164,19 @@ func (ra *RemoveAdministrator) Validate() error {
if len(ra.ToRemove) == 0 {
return fmt.Errorf("nothing to remove")
}
- if ra.author == nil {
- return fmt.Errorf("author not set")
- }
- return ra.author.Validate()
-}
-
-func (ra *RemoveAdministrator) Author() identity.Interface {
- return ra.author
+ return ra.OpBase.Validate(ra, RemoveAdministratorOp)
}
// Apply is the function that makes changes on the snapshot
func (ra *RemoveAdministrator) Apply(snapshot *Snapshot) {
// check if we are allowed to make changes
- if !snapshot.HasAdministrator(ra.author) {
+ if !snapshot.HasAdministrator(ra.Author()) {
return
}
// special rule: we can't end up with no administrator
stillSome := false
for admin, _ := range snapshot.Administrator {
- if admin != ra.author {
+ if admin != ra.Author() {
stillSome = true
break
}
@@ -245,71 +214,52 @@ var def = dag.Definition{
// operationUnmarshaller is a function doing the de-serialization of the JSON data into our own
// concrete Operations. If needed, we can use the resolver to connect to other entities.
-func operationUnmarshaller(author identity.Interface, raw json.RawMessage, resolver identity.Resolver) (dag.Operation, error) {
+func operationUnmarshaller(raw json.RawMessage, resolver identity.Resolver) (dag.Operation, error) {
var t struct {
- OperationType OperationType `json:"type"`
+ OperationType dag.OperationType `json:"type"`
}
if err := json.Unmarshal(raw, &t); err != nil {
return nil, err
}
- var value interface{}
+ var op dag.Operation
switch t.OperationType {
case AddAdministratorOp:
- value = &addAdministratorJson{}
+ op = &AddAdministrator{}
case RemoveAdministratorOp:
- value = &removeAdministratorJson{}
+ op = &RemoveAdministrator{}
case SetSignatureRequiredOp:
- value = &SetSignatureRequired{}
+ op = &SetSignatureRequired{}
default:
panic(fmt.Sprintf("unknown operation type %v", t.OperationType))
}
- err := json.Unmarshal(raw, &value)
+ err := json.Unmarshal(raw, &op)
if err != nil {
return nil, err
}
- var op Operation
-
- switch value := value.(type) {
- case *SetSignatureRequired:
- value.author = author
- op = value
- case *addAdministratorJson:
- // We need something less straightforward to deserialize and resolve identities
- aa := &AddAdministrator{
- author: author,
- OperationType: AddAdministratorOp,
- ToAdd: make([]identity.Interface, len(value.ToAdd)),
- }
- for i, stub := range value.ToAdd {
+ switch op := op.(type) {
+ case *AddAdministrator:
+ // We need to resolve identities
+ for i, stub := range op.ToAdd {
iden, err := resolver.ResolveIdentity(stub.Id())
if err != nil {
return nil, err
}
- aa.ToAdd[i] = iden
+ op.ToAdd[i] = iden
}
- op = aa
- case *removeAdministratorJson:
- // We need something less straightforward to deserialize and resolve identities
- ra := &RemoveAdministrator{
- author: author,
- OperationType: RemoveAdministratorOp,
- ToRemove: make([]identity.Interface, len(value.ToRemove)),
- }
- for i, stub := range value.ToRemove {
+ case *RemoveAdministrator:
+ // We need to resolve identities
+ for i, stub := range op.ToRemove {
iden, err := resolver.ResolveIdentity(stub.Id())
if err != nil {
return nil, err
}
- ra.ToRemove[i] = iden
+ op.ToRemove[i] = iden
}
- op = ra
- default:
- panic(fmt.Sprintf("unknown operation type %T", value))
}
return op, nil
diff --git a/entity/dag/op_noop.go b/entity/dag/op_noop.go
new file mode 100644
index 00000000..2bc53578
--- /dev/null
+++ b/entity/dag/op_noop.go
@@ -0,0 +1,39 @@
+package dag
+
+import (
+ "github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/identity"
+)
+
+var _ Operation = &NoOpOperation[Snapshot]{}
+var _ OperationDoesntChangeSnapshot = &NoOpOperation[Snapshot]{}
+
+// NoOpOperation is an operation that does not change the entity state. It can
+// however be used to store arbitrary metadata in the entity history, for example
+// to support a bridge feature.
+type NoOpOperation[SnapT Snapshot] struct {
+ OpBase
+}
+
+func NewNoOpOp[SnapT Snapshot](opType OperationType, author identity.Interface, unixTime int64) *NoOpOperation[SnapT] {
+ return &NoOpOperation[SnapT]{
+ OpBase: NewOpBase(opType, author, unixTime),
+ }
+}
+
+func (op *NoOpOperation[SnapT]) Id() entity.Id {
+ return IdOperation(op, &op.OpBase)
+}
+
+func (op *NoOpOperation[SnapT]) Apply(snapshot SnapT) {
+ // Nothing to do
+}
+
+func (op *NoOpOperation[SnapT]) Validate() error {
+ if err := op.OpBase.Validate(op, op.OperationType); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (op *NoOpOperation[SnapT]) DoesntChangeSnapshot() {}
diff --git a/entity/dag/op_noop_test.go b/entity/dag/op_noop_test.go
new file mode 100644
index 00000000..e2f5cde0
--- /dev/null
+++ b/entity/dag/op_noop_test.go
@@ -0,0 +1,13 @@
+package dag
+
+import (
+ "testing"
+
+ "github.com/MichaelMure/git-bug/identity"
+)
+
+func TestNoopSerialize(t *testing.T) {
+ SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *NoOpOperation[*snapshotMock] {
+ return NewNoOpOp[*snapshotMock](1, author, unixTime)
+ })
+}
diff --git a/entity/dag/op_set_metadata.go b/entity/dag/op_set_metadata.go
new file mode 100644
index 00000000..bf32171f
--- /dev/null
+++ b/entity/dag/op_set_metadata.go
@@ -0,0 +1,68 @@
+package dag
+
+import (
+ "fmt"
+
+ "github.com/pkg/errors"
+
+ "github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/identity"
+ "github.com/MichaelMure/git-bug/util/text"
+)
+
+var _ Operation = &SetMetadataOperation[Snapshot]{}
+var _ OperationDoesntChangeSnapshot = &SetMetadataOperation[Snapshot]{}
+
+type SetMetadataOperation[SnapT Snapshot] struct {
+ OpBase
+ Target entity.Id `json:"target"`
+ NewMetadata map[string]string `json:"new_metadata"`
+}
+
+func NewSetMetadataOp[SnapT Snapshot](opType OperationType, author identity.Interface, unixTime int64, target entity.Id, newMetadata map[string]string) *SetMetadataOperation[SnapT] {
+ return &SetMetadataOperation[SnapT]{
+ OpBase: NewOpBase(opType, author, unixTime),
+ Target: target,
+ NewMetadata: newMetadata,
+ }
+}
+
+func (op *SetMetadataOperation[SnapT]) Id() entity.Id {
+ return IdOperation(op, &op.OpBase)
+}
+
+func (op *SetMetadataOperation[SnapT]) Apply(snapshot SnapT) {
+ for _, target := range snapshot.AllOperations() {
+ if target.Id() == op.Target {
+ // Apply the metadata in an immutable way: if a metadata already
+ // exist, it's not possible to override it.
+ for key, value := range op.NewMetadata {
+ target.setExtraMetadataImmutable(key, value)
+ }
+ return
+ }
+ }
+}
+
+func (op *SetMetadataOperation[SnapT]) Validate() error {
+ if err := op.OpBase.Validate(op, op.OperationType); err != nil {
+ return err
+ }
+
+ if err := op.Target.Validate(); err != nil {
+ return errors.Wrap(err, "target invalid")
+ }
+
+ for key, val := range op.NewMetadata {
+ if !text.SafeOneLine(key) {
+ return fmt.Errorf("metadata key is unsafe")
+ }
+ if !text.Safe(val) {
+ return fmt.Errorf("metadata value is not fully printable")
+ }
+ }
+
+ return nil
+}
+
+func (op *SetMetadataOperation[SnapT]) DoesntChangeSnapshot() {}
diff --git a/entity/dag/op_set_metadata_test.go b/entity/dag/op_set_metadata_test.go
new file mode 100644
index 00000000..4dab8a96
--- /dev/null
+++ b/entity/dag/op_set_metadata_test.go
@@ -0,0 +1,106 @@
+package dag
+
+import (
+ "testing"
+ "time"
+
+ "github.com/MichaelMure/git-bug/identity"
+ "github.com/MichaelMure/git-bug/repository"
+
+ "github.com/stretchr/testify/require"
+)
+
+type snapshotMock struct {
+ ops []Operation
+}
+
+func (s *snapshotMock) AllOperations() []Operation {
+ return s.ops
+}
+
+func TestSetMetadata(t *testing.T) {
+ snap := &snapshotMock{}
+
+ repo := repository.NewMockRepo()
+
+ rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
+ require.NoError(t, err)
+
+ unix := time.Now().Unix()
+
+ target1 := NewNoOpOp[*snapshotMock](1, rene, unix)
+ target1.SetMetadata("key", "value")
+ snap.ops = append(snap.ops, target1)
+
+ target2 := NewNoOpOp[*snapshotMock](1, rene, unix)
+ target2.SetMetadata("key2", "value2")
+ snap.ops = append(snap.ops, target2)
+
+ op1 := NewSetMetadataOp[*snapshotMock](2, rene, unix, target1.Id(), map[string]string{
+ "key": "override",
+ "key2": "value",
+ })
+
+ op1.Apply(snap)
+ snap.ops = append(snap.ops, op1)
+
+ target1Metadata := snap.AllOperations()[0].AllMetadata()
+ require.Len(t, target1Metadata, 2)
+ // original key is not overrided
+ require.Equal(t, target1Metadata["key"], "value")
+ // new key is set
+ require.Equal(t, target1Metadata["key2"], "value")
+
+ target2Metadata := snap.AllOperations()[1].AllMetadata()
+ require.Len(t, target2Metadata, 1)
+ require.Equal(t, target2Metadata["key2"], "value2")
+
+ op2 := NewSetMetadataOp[*snapshotMock](2, rene, unix, target2.Id(), map[string]string{
+ "key2": "value",
+ "key3": "value3",
+ })
+
+ op2.Apply(snap)
+ snap.ops = append(snap.ops, op2)
+
+ target1Metadata = snap.AllOperations()[0].AllMetadata()
+ require.Len(t, target1Metadata, 2)
+ require.Equal(t, target1Metadata["key"], "value")
+ require.Equal(t, target1Metadata["key2"], "value")
+
+ target2Metadata = snap.AllOperations()[1].AllMetadata()
+ require.Len(t, target2Metadata, 2)
+ // original key is not overrided
+ require.Equal(t, target2Metadata["key2"], "value2")
+ // new key is set
+ require.Equal(t, target2Metadata["key3"], "value3")
+
+ op3 := NewSetMetadataOp[*snapshotMock](2, rene, unix, target1.Id(), map[string]string{
+ "key": "override",
+ "key2": "override",
+ })
+
+ op3.Apply(snap)
+ snap.ops = append(snap.ops, op3)
+
+ target1Metadata = snap.AllOperations()[0].AllMetadata()
+ require.Len(t, target1Metadata, 2)
+ // original key is not overrided
+ require.Equal(t, target1Metadata["key"], "value")
+ // previously set key is not overrided
+ require.Equal(t, target1Metadata["key2"], "value")
+
+ target2Metadata = snap.AllOperations()[1].AllMetadata()
+ require.Len(t, target2Metadata, 2)
+ require.Equal(t, target2Metadata["key2"], "value2")
+ require.Equal(t, target2Metadata["key3"], "value3")
+}
+
+func TestSetMetadataSerialize(t *testing.T) {
+ SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *SetMetadataOperation[*snapshotMock] {
+ return NewSetMetadataOp[*snapshotMock](1, author, unixTime, "message", map[string]string{
+ "key1": "value1",
+ "key2": "value2",
+ })
+ })
+}
diff --git a/entity/dag/operation.go b/entity/dag/operation.go
index a320859f..0227b3e0 100644
--- a/entity/dag/operation.go
+++ b/entity/dag/operation.go
@@ -1,11 +1,21 @@
package dag
import (
+ "crypto/rand"
+ "encoding/json"
+ "fmt"
+ "time"
+
+ "github.com/pkg/errors"
+
"github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
)
+// OperationType is an operation type identifier
+type OperationType int
+
// Operation is a piece of data defining a change to reflect on the state of an Entity.
// What this Operation or Entity's state looks like is not of the resort of this package as it only deals with the
// data structure and storage.
@@ -22,23 +32,39 @@ type Operation interface {
// a minimal amount of entropy and avoid collision.
//
// Author's note: I tried to find a clever way around that inelegance (stuffing random useless data into the stored
- // structure is not exactly elegant) but I failed to find a proper way. Essentially, anything that would reuse some
+ // structure is not exactly elegant), but I failed to find a proper way. Essentially, anything that would reuse some
// other data (parent operation's Id, lamport clock) or the graph structure (depth) impose that the Id would only
// make sense in the context of the graph and yield some deep coupling between Entity and Operation. This in turn
// make the whole thing even less elegant.
//
// A common way to derive an Id will be to use the entity.DeriveId() function on the serialized operation data.
Id() entity.Id
+ // Type return the type of the operation
+ Type() OperationType
// Validate check if the Operation data is valid
Validate() error
// Author returns the author of this operation
Author() identity.Interface
+ // Time return the time when the operation was added
+ Time() time.Time
+
+ // SetMetadata store arbitrary metadata about the operation
+ SetMetadata(key string, value string)
+ // GetMetadata retrieve arbitrary metadata about the operation
+ GetMetadata(key string) (string, bool)
+ // AllMetadata return all metadata for this operation
+ AllMetadata() map[string]string
+
+ // setId allow to set the Id, used when unmarshalling only
+ setId(id entity.Id)
+ // setAuthor allow to set the author, used when unmarshalling only
+ setAuthor(author identity.Interface)
+ // setExtraMetadataImmutable add a metadata not carried by the operation itself on the operation
+ setExtraMetadataImmutable(key string, value string)
}
-// OperationWithFiles is an extended Operation that has files dependency, stored in git.
+// OperationWithFiles is an optional extension for an Operation that has files dependency, stored in git.
type OperationWithFiles interface {
- Operation
-
// GetFiles return the files needed by this operation
// This implies that the Operation maintain and store internally the references to those files. This is how
// this information is read later, when loading from storage.
@@ -46,3 +72,201 @@ type OperationWithFiles interface {
// hash).
GetFiles() []repository.Hash
}
+
+// OperationDoesntChangeSnapshot is an interface signaling that the Operation implementing it doesn't change the
+// snapshot, for example a metadata operation that act on other operations.
+type OperationDoesntChangeSnapshot interface {
+ DoesntChangeSnapshot()
+}
+
+// Snapshot is the minimal interface that a snapshot need to implement
+type Snapshot interface {
+ // AllOperations returns all the operations that have been applied to that snapshot, in order
+ AllOperations() []Operation
+}
+
+// OpBase implement the common feature that every Operation should support.
+type OpBase struct {
+ // Not serialized. Store the op's id in memory.
+ id entity.Id
+ // Not serialized
+ author identity.Interface
+
+ OperationType OperationType `json:"type"`
+ UnixTime int64 `json:"timestamp"`
+
+ // mandatory random bytes to ensure a better randomness of the data used to later generate the ID
+ // len(Nonce) should be > 20 and < 64 bytes
+ // It has no functional purpose and should be ignored.
+ Nonce []byte `json:"nonce"`
+
+ Metadata map[string]string `json:"metadata,omitempty"`
+ // Not serialized. Store the extra metadata in memory,
+ // compiled from SetMetadataOperation.
+ extraMetadata map[string]string
+}
+
+func NewOpBase(opType OperationType, author identity.Interface, unixTime int64) OpBase {
+ return OpBase{
+ OperationType: opType,
+ author: author,
+ UnixTime: unixTime,
+ Nonce: makeNonce(20),
+ id: entity.UnsetId,
+ }
+}
+
+func makeNonce(len int) []byte {
+ result := make([]byte, len)
+ _, err := rand.Read(result)
+ if err != nil {
+ panic(err)
+ }
+ return result
+}
+
+func IdOperation(op Operation, base *OpBase) entity.Id {
+ if base.id == "" {
+ // something went really wrong
+ panic("op's id not set")
+ }
+ if base.id == entity.UnsetId {
+ // This means we are trying to get the op's Id *before* it has been stored, for instance when
+ // adding multiple ops in one go in an OperationPack.
+ // As the Id is computed based on the actual bytes written on the disk, we are going to predict
+ // those and then get the Id. This is safe as it will be the exact same code writing on disk later.
+
+ data, err := json.Marshal(op)
+ if err != nil {
+ panic(err)
+ }
+
+ base.id = entity.DeriveId(data)
+ }
+ return base.id
+}
+
+func (base *OpBase) Type() OperationType {
+ return base.OperationType
+}
+
+// Time return the time when the operation was added
+func (base *OpBase) Time() time.Time {
+ return time.Unix(base.UnixTime, 0)
+}
+
+// Validate check the OpBase for errors
+func (base *OpBase) Validate(op Operation, opType OperationType) error {
+ if base.OperationType == 0 {
+ return fmt.Errorf("operation type unset")
+ }
+ if base.OperationType != opType {
+ return fmt.Errorf("incorrect operation type (expected: %v, actual: %v)", opType, base.OperationType)
+ }
+
+ if op.Time().Unix() == 0 {
+ return fmt.Errorf("time not set")
+ }
+
+ if base.author == nil {
+ return fmt.Errorf("author not set")
+ }
+
+ if err := op.Author().Validate(); err != nil {
+ return errors.Wrap(err, "author")
+ }
+
+ if op, ok := op.(OperationWithFiles); ok {
+ for _, hash := range op.GetFiles() {
+ if !hash.IsValid() {
+ return fmt.Errorf("file with invalid hash %v", hash)
+ }
+ }
+ }
+
+ if len(base.Nonce) > 64 {
+ return fmt.Errorf("nonce is too big")
+ }
+ if len(base.Nonce) < 20 {
+ return fmt.Errorf("nonce is too small")
+ }
+
+ return nil
+}
+
+// IsAuthored is a sign post method for gqlgen
+func (base *OpBase) IsAuthored() {}
+
+// Author return author identity
+func (base *OpBase) Author() identity.Interface {
+ return base.author
+}
+
+// IdIsSet returns true if the id has been set already
+func (base *OpBase) IdIsSet() bool {
+ return base.id != "" && base.id != entity.UnsetId
+}
+
+// SetMetadata store arbitrary metadata about the operation
+func (base *OpBase) SetMetadata(key string, value string) {
+ if base.IdIsSet() {
+ panic("set metadata on an operation with already an Id")
+ }
+
+ if base.Metadata == nil {
+ base.Metadata = make(map[string]string)
+ }
+ base.Metadata[key] = value
+}
+
+// GetMetadata retrieve arbitrary metadata about the operation
+func (base *OpBase) GetMetadata(key string) (string, bool) {
+ val, ok := base.Metadata[key]
+
+ if ok {
+ return val, true
+ }
+
+ // extraMetadata can't replace the original operations value if any
+ val, ok = base.extraMetadata[key]
+
+ return val, ok
+}
+
+// AllMetadata return all metadata for this operation
+func (base *OpBase) AllMetadata() map[string]string {
+ result := make(map[string]string)
+
+ for key, val := range base.extraMetadata {
+ result[key] = val
+ }
+
+ // Original metadata take precedence
+ for key, val := range base.Metadata {
+ result[key] = val
+ }
+
+ return result
+}
+
+// setId allow to set the Id, used when unmarshalling only
+func (base *OpBase) setId(id entity.Id) {
+ if base.id != "" && base.id != entity.UnsetId {
+ panic("trying to set id again")
+ }
+ base.id = id
+}
+
+// setAuthor allow to set the author, used when unmarshalling only
+func (base *OpBase) setAuthor(author identity.Interface) {
+ base.author = author
+}
+
+func (base *OpBase) setExtraMetadataImmutable(key string, value string) {
+ if base.extraMetadata == nil {
+ base.extraMetadata = make(map[string]string)
+ }
+ if _, exist := base.extraMetadata[key]; !exist {
+ base.extraMetadata[key] = value
+ }
+}
diff --git a/entity/dag/operation_pack.go b/entity/dag/operation_pack.go
index 9b42f9bf..b2973343 100644
--- a/entity/dag/operation_pack.go
+++ b/entity/dag/operation_pack.go
@@ -314,10 +314,15 @@ func unmarshallPack(def Definition, resolver identity.Resolver, data []byte) ([]
for _, raw := range aux.Operations {
// delegate to specialized unmarshal function
- op, err := def.OperationUnmarshaler(author, raw, resolver)
+ op, err := def.OperationUnmarshaler(raw, resolver)
if err != nil {
return nil, nil, err
}
+ // Set the id from the serialized data
+ op.setId(entity.DeriveId(raw))
+ // Set the author, taken from the OperationPack
+ op.setAuthor(author)
+
ops = append(ops, op)
}
diff --git a/entity/dag/operation_pack_test.go b/entity/dag/operation_pack_test.go
index 73960800..e438e4c5 100644
--- a/entity/dag/operation_pack_test.go
+++ b/entity/dag/operation_pack_test.go
@@ -11,13 +11,13 @@ import (
)
func TestOperationPackReadWrite(t *testing.T) {
- repo, id1, _, resolver, def := makeTestContext()
+ repo, author, _, resolver, def := makeTestContext()
opp := &operationPack{
- Author: id1,
+ Author: author,
Operations: []Operation{
- newOp1(id1, "foo"),
- newOp2(id1, "bar"),
+ newOp1(author, "foo"),
+ newOp2(author, "bar"),
},
CreateTime: 123,
EditTime: 456,
@@ -32,34 +32,26 @@ func TestOperationPackReadWrite(t *testing.T) {
opp2, err := readOperationPack(def, repo, resolver, commit)
require.NoError(t, err)
- require.Equal(t, opp, opp2)
-
- // make sure we get the same Id with the same data
- opp3 := &operationPack{
- Author: id1,
- Operations: []Operation{
- newOp1(id1, "foo"),
- newOp2(id1, "bar"),
- },
- CreateTime: 123,
- EditTime: 456,
+ for _, op := range opp.Operations {
+ // force the creation of the id
+ op.Id()
}
- require.Equal(t, opp.Id(), opp3.Id())
+ require.Equal(t, opp, opp2)
}
func TestOperationPackSignedReadWrite(t *testing.T) {
- repo, id1, _, resolver, def := makeTestContext()
+ repo, author, _, resolver, def := makeTestContext()
- err := id1.(*identity.Identity).Mutate(repo, func(orig *identity.Mutator) {
+ err := author.(*identity.Identity).Mutate(repo, func(orig *identity.Mutator) {
orig.Keys = append(orig.Keys, identity.GenerateKey())
})
require.NoError(t, err)
opp := &operationPack{
- Author: id1,
+ Author: author,
Operations: []Operation{
- newOp1(id1, "foo"),
- newOp2(id1, "bar"),
+ newOp1(author, "foo"),
+ newOp2(author, "bar"),
},
CreateTime: 123,
EditTime: 456,
@@ -74,23 +66,15 @@ func TestOperationPackSignedReadWrite(t *testing.T) {
opp2, err := readOperationPack(def, repo, resolver, commit)
require.NoError(t, err)
- require.Equal(t, opp, opp2)
-
- // make sure we get the same Id with the same data
- opp3 := &operationPack{
- Author: id1,
- Operations: []Operation{
- newOp1(id1, "foo"),
- newOp2(id1, "bar"),
- },
- CreateTime: 123,
- EditTime: 456,
+ for _, op := range opp.Operations {
+ // force the creation of the id
+ op.Id()
}
- require.Equal(t, opp.Id(), opp3.Id())
+ require.Equal(t, opp, opp2)
}
func TestOperationPackFiles(t *testing.T) {
- repo, id1, _, resolver, def := makeTestContext()
+ repo, author, _, resolver, def := makeTestContext()
blobHash1, err := repo.StoreData(randomData())
require.NoError(t, err)
@@ -99,10 +83,10 @@ func TestOperationPackFiles(t *testing.T) {
require.NoError(t, err)
opp := &operationPack{
- Author: id1,
+ Author: author,
Operations: []Operation{
- newOp1(id1, "foo", blobHash1, blobHash2),
- newOp1(id1, "foo", blobHash2),
+ newOp1(author, "foo", blobHash1, blobHash2),
+ newOp1(author, "foo", blobHash2),
},
CreateTime: 123,
EditTime: 456,
@@ -117,6 +101,10 @@ func TestOperationPackFiles(t *testing.T) {
opp2, err := readOperationPack(def, repo, resolver, commit)
require.NoError(t, err)
+ for _, op := range opp.Operations {
+ // force the creation of the id
+ op.Id()
+ }
require.Equal(t, opp, opp2)
require.ElementsMatch(t, opp2.Operations[0].(OperationWithFiles).GetFiles(), []repository.Hash{
diff --git a/entity/dag/operation_testing.go b/entity/dag/operation_testing.go
new file mode 100644
index 00000000..29923eec
--- /dev/null
+++ b/entity/dag/operation_testing.go
@@ -0,0 +1,57 @@
+package dag
+
+import (
+ "encoding/json"
+ "testing"
+ "time"
+
+ "github.com/stretchr/testify/require"
+
+ "github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/identity"
+ "github.com/MichaelMure/git-bug/repository"
+)
+
+// SerializeRoundTripTest realize a marshall/unmarshall round-trip in the same condition as with OperationPack,
+// and check if the recovered operation is identical.
+func SerializeRoundTripTest[OpT Operation](t *testing.T, maker func(author identity.Interface, unixTime int64) OpT) {
+ repo := repository.NewMockRepo()
+
+ rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
+ require.NoError(t, err)
+
+ op := maker(rene, time.Now().Unix())
+ // enforce having an id
+ op.Id()
+
+ rdt := &roundTripper[OpT]{Before: op, author: rene}
+
+ data, err := json.Marshal(rdt)
+ require.NoError(t, err)
+
+ err = json.Unmarshal(data, &rdt)
+ require.NoError(t, err)
+
+ require.Equal(t, op, rdt.after)
+}
+
+type roundTripper[OpT Operation] struct {
+ Before OpT
+ author identity.Interface
+ after OpT
+}
+
+func (r *roundTripper[OpT]) MarshalJSON() ([]byte, error) {
+ return json.Marshal(r.Before)
+}
+
+func (r *roundTripper[OpT]) UnmarshalJSON(data []byte) error {
+ if err := json.Unmarshal(data, &r.after); err != nil {
+ return err
+ }
+ // Set the id from the serialized data
+ r.after.setId(entity.DeriveId(data))
+ // Set the author, as OperationPack would do
+ r.after.setAuthor(r.author)
+ return nil
+}
diff --git a/go.mod b/go.mod
index d137f2c2..0b49cc35 100644
--- a/go.mod
+++ b/go.mod
@@ -1,17 +1,16 @@
module github.com/MichaelMure/git-bug
-go 1.16
+go 1.18
require (
- github.com/99designs/gqlgen v0.17.1
+ github.com/99designs/gqlgen v0.17.13
github.com/99designs/keyring v1.2.1
github.com/MichaelMure/go-term-text v0.3.1
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7
github.com/araddon/dateparse v0.0.0-20190622164848-0fb0a474d195
github.com/awesome-gocui/gocui v1.1.0
github.com/blevesearch/bleve v1.0.14
- github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9
- github.com/corpix/uarand v0.1.1 // indirect
+ github.com/cheekybits/genny v1.0.0
github.com/dustin/go-humanize v1.0.0
github.com/fatih/color v1.13.0
github.com/go-git/go-billy/v5 v5.3.1
@@ -23,11 +22,10 @@ require (
github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5
github.com/pkg/errors v0.9.1
github.com/shurcooL/githubv4 v0.0.0-20190601194912-068505affed7
- github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect
github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.7.2
- github.com/vektah/gqlparser/v2 v2.4.1
+ github.com/vektah/gqlparser/v2 v2.4.6
github.com/xanzy/go-gitlab v0.68.0
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
@@ -35,3 +33,71 @@ require (
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a
golang.org/x/text v0.3.7
)
+
+require (
+ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
+ github.com/Microsoft/go-winio v0.4.16 // indirect
+ github.com/RoaringBitmap/roaring v0.4.23 // indirect
+ github.com/acomagu/bufpipe v1.0.3 // indirect
+ github.com/agnivade/levenshtein v1.1.1 // indirect
+ github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
+ github.com/blevesearch/mmap-go v1.0.2 // indirect
+ github.com/blevesearch/segment v0.9.0 // indirect
+ github.com/blevesearch/snowballstem v0.9.0 // indirect
+ github.com/blevesearch/zap/v11 v11.0.14 // indirect
+ github.com/blevesearch/zap/v12 v12.0.14 // indirect
+ github.com/blevesearch/zap/v13 v13.0.6 // indirect
+ github.com/blevesearch/zap/v14 v14.0.5 // indirect
+ github.com/blevesearch/zap/v15 v15.0.3 // indirect
+ github.com/corpix/uarand v0.1.1 // indirect
+ github.com/couchbase/vellum v1.0.2 // indirect
+ github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
+ github.com/danieljoos/wincred v1.1.2 // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
+ github.com/emirpasic/gods v1.12.0 // indirect
+ github.com/gdamore/encoding v1.0.0 // indirect
+ github.com/gdamore/tcell/v2 v2.4.0 // indirect
+ github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect
+ github.com/go-git/gcfg v1.5.0 // indirect
+ github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
+ github.com/golang/protobuf v1.5.2 // indirect
+ github.com/golang/snappy v0.0.1 // indirect
+ github.com/google/go-querystring v1.1.0 // indirect
+ github.com/gorilla/websocket v1.5.0 // indirect
+ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
+ github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
+ github.com/hashicorp/go-retryablehttp v0.7.1 // indirect
+ github.com/imdario/mergo v0.3.12 // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
+ github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
+ github.com/lucasb-eyer/go-colorful v1.0.3 // indirect
+ github.com/mattn/go-colorable v0.1.12 // indirect
+ github.com/mattn/go-runewidth v0.0.12 // indirect
+ github.com/mitchellh/go-homedir v1.1.0 // indirect
+ github.com/mitchellh/mapstructure v1.3.1 // indirect
+ github.com/mschoch/smat v0.2.0 // indirect
+ github.com/mtibben/percent v0.2.1 // indirect
+ github.com/philhofer/fwd v1.0.0 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/rivo/uniseg v0.1.0 // indirect
+ github.com/russross/blackfriday/v2 v2.1.0 // indirect
+ github.com/sergi/go-diff v1.1.0 // indirect
+ github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ github.com/steveyen/gtreap v0.1.0 // indirect
+ github.com/stretchr/objx v0.3.0 // indirect
+ github.com/tinylib/msgp v1.1.0 // indirect
+ github.com/willf/bitset v1.1.10 // indirect
+ github.com/xanzy/ssh-agent v0.3.0 // indirect
+ go.etcd.io/bbolt v1.3.5 // indirect
+ golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
+ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
+ golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
+ google.golang.org/appengine v1.6.7 // indirect
+ google.golang.org/protobuf v1.28.0 // indirect
+ gopkg.in/warnings.v0 v0.1.2 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
+)
diff --git a/go.sum b/go.sum
index 8c8a995d..7ff32c6b 100644
--- a/go.sum
+++ b/go.sum
@@ -33,11 +33,12 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs=
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4=
-github.com/99designs/gqlgen v0.17.1 h1:i2qQMPKHQjHgBWYIpO4TsaQpPqMHCPK1+h95ipvH8VU=
-github.com/99designs/gqlgen v0.17.1/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o=
+github.com/99designs/gqlgen v0.17.13 h1:ETUEqvRg5Zvr1lXtpoRdj026fzVay0ZlJPwI33qXLIw=
+github.com/99designs/gqlgen v0.17.13/go.mod h1:w1brbeOdqVyNJI553BGwtwdVcYu1LKeYE1opLWN9RgQ=
github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o=
github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Masterminds/glide v0.13.2/go.mod h1:STyF5vcenH/rUqTEv+/hBXlSTo7KYwg2oc2f4tzPWic=
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
@@ -54,8 +55,8 @@ github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
-github.com/agnivade/levenshtein v1.1.0 h1:n6qGwyHG61v3ABce1rPVZklEYRT8NFpCMrpZdBUbYGM=
-github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
+github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
+github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
@@ -101,8 +102,8 @@ github.com/blevesearch/zap/v14 v14.0.5/go.mod h1:bWe8S7tRrSBTIaZ6cLRbgNH4TUDaC9L
github.com/blevesearch/zap/v15 v15.0.3 h1:Ylj8Oe+mo0P25tr9iLPp33lN6d4qcztGjaIsP51UxaY=
github.com/blevesearch/zap/v15 v15.0.3/go.mod h1:iuwQrImsh1WjWJ0Ue2kBqY83a0rFtJTqfa9fp1rbVVU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9 h1:a1zrFsLFac2xoM6zG1u72DWJwZG3ayttYLfmLbxVETk=
-github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
+github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE=
+github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
@@ -118,9 +119,7 @@ github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiG
github.com/couchbase/moss v0.1.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs=
github.com/couchbase/vellum v1.0.2 h1:BrbP0NKiyDdndMPec8Jjhy0U47CZ0Lgx3xUC2r9rZqw=
github.com/couchbase/vellum v1.0.2/go.mod h1:FcwrEivFpNi24R3jLOs3n+fs5RnuQnQqCLBJ1uAg1W4=
-github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
-github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -236,8 +235,8 @@ github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKp
github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
-github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
+github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
@@ -289,11 +288,10 @@ github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
-github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE=
-github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
+github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
+github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
@@ -303,8 +301,8 @@ github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRC
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.2.3 h1:f/MjBEBDLttYCGfRaKBbKSRVF5aV2O6fnBpzknuE3jU=
-github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/mapstructure v1.3.1 h1:cCBH2gTD2K0OtLlv/Y5H01VQCqmlDxz30kS5Y5bqfLA=
+github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg=
github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
@@ -331,9 +329,7 @@ github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qq
github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
-github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
@@ -342,7 +338,6 @@ github.com/shurcooL/githubv4 v0.0.0-20190601194912-068505affed7 h1:Vk3RiBQpF0Ja+
github.com/shurcooL/githubv4 v0.0.0-20190601194912-068505affed7/go.mod h1:hAF0iLZy4td2EX+/8Tw+4nodhlMrwN3HupfaXj3zkGo=
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f h1:tygelZueB1EtXkPI6mQ4o9DQ0+FKW41hTbunoXZCTqk=
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg=
-github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e h1:VAzdS5Nw68fbf5RZ8RDVlUvPXNU6Z3jtPCK/qvm4FoQ=
github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog=
@@ -366,6 +361,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
@@ -376,10 +372,9 @@ github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7
github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU=
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
-github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
-github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
-github.com/vektah/gqlparser/v2 v2.4.1 h1:QOyEn8DAPMUMARGMeshKDkDgNmVoEaEGiDB0uWxcSlQ=
-github.com/vektah/gqlparser/v2 v2.4.1/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
+github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY=
+github.com/vektah/gqlparser/v2 v2.4.6 h1:Yjzp66g6oVq93Jihbi0qhGnf/6zIWjcm8H6gA27zstE=
+github.com/vektah/gqlparser/v2 v2.4.6/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc=
github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/xanzy/go-gitlab v0.68.0 h1:b2iMQHgZ1V+NyRqLRJVv6RFfr4xnd/AASeS/PETYL0Y=
@@ -387,6 +382,7 @@ github.com/xanzy/go-gitlab v0.68.0/go.mod h1:o4yExCtdaqlM8YGdDJWuZoBmfxBsmA9TPEj
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -407,6 +403,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE=
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -440,6 +437,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
+golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -470,7 +468,6 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y=
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
@@ -497,7 +494,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -532,6 +528,7 @@ golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a h1:ppl5mZgokTT8uPkmYOyEUmPTr3ypaKkg5eFOGrAmxxE=
@@ -592,9 +589,9 @@ golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
+golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -693,14 +690,12 @@ gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/misc/random_bugs/create_random_bugs.go b/misc/random_bugs/create_random_bugs.go
index a69918f4..a6f636ad 100644
--- a/misc/random_bugs/create_random_bugs.go
+++ b/misc/random_bugs/create_random_bugs.go
@@ -87,6 +87,7 @@ func generateRandomBugsWithSeed(opts Options, seed int64) []*bug.Bug {
time.Now().Unix(),
fake.Sentence(),
paragraphs(),
+ nil, nil,
)
if err != nil {
@@ -143,19 +144,19 @@ func paragraphs() string {
}
func comment(b bug.Interface, p identity.Interface, timestamp int64) {
- _, _ = bug.AddComment(b, p, timestamp, paragraphs())
+ _, _ = bug.AddComment(b, p, timestamp, paragraphs(), nil, nil)
}
func title(b bug.Interface, p identity.Interface, timestamp int64) {
- _, _ = bug.SetTitle(b, p, timestamp, fake.Sentence())
+ _, _ = bug.SetTitle(b, p, timestamp, fake.Sentence(), nil)
}
func open(b bug.Interface, p identity.Interface, timestamp int64) {
- _, _ = bug.Open(b, p, timestamp)
+ _, _ = bug.Open(b, p, timestamp, nil)
}
func close(b bug.Interface, p identity.Interface, timestamp int64) {
- _, _ = bug.Close(b, p, timestamp)
+ _, _ = bug.Close(b, p, timestamp, nil)
}
var addedLabels []string
@@ -182,5 +183,5 @@ func labels(b bug.Interface, p identity.Interface, timestamp int64) {
// ignore error
// if the randomisation produce no changes, no op
// is added to the bug
- _, _, _ = bug.ChangeLabels(b, p, timestamp, added, removed)
+ _, _, _ = bug.ChangeLabels(b, p, timestamp, added, removed, nil)
}
diff --git a/repository/gogit.go b/repository/gogit.go
index 71cddfb2..d94965cb 100644
--- a/repository/gogit.go
+++ b/repository/gogit.go
@@ -235,7 +235,7 @@ func (repo *GoGitRepo) Keyring() Keyring {
return repo.keyring
}
-// GetUserName returns the name the the user has used to configure git
+// GetUserName returns the name the user has used to configure git
func (repo *GoGitRepo) GetUserName() (string, error) {
return repo.AnyConfig().ReadString("user.name")
}
diff --git a/repository/repo.go b/repository/repo.go
index 1994f6dd..2f90b437 100644
--- a/repository/repo.go
+++ b/repository/repo.go
@@ -60,9 +60,9 @@ type RepoKeyring interface {
Keyring() Keyring
}
-// RepoCommon represent the common function the we want all the repo to implement
+// RepoCommon represent the common function we want all repos to implement
type RepoCommon interface {
- // GetUserName returns the name the the user has used to configure git
+ // GetUserName returns the name the user has used to configure git
GetUserName() (string, error)
// GetUserEmail returns the email address that the user has used to configure git.
diff --git a/webui/debug_assets.go b/webui/debug_assets.go
index 87ec4f6c..ffefbcab 100644
--- a/webui/debug_assets.go
+++ b/webui/debug_assets.go
@@ -1,4 +1,4 @@
-// +build debugwebui
+//go:build debugwebui
package webui
diff --git a/webui/pack_webui.go b/webui/pack_webui.go
index 69cac9d4..91e2053f 100644
--- a/webui/pack_webui.go
+++ b/webui/pack_webui.go
@@ -1,4 +1,4 @@
-// +build ignore
+//go:build ignore
package main
diff --git a/webui/packed_assets.go b/webui/packed_assets.go
index 90bc6b38..eb244920 100644
--- a/webui/packed_assets.go
+++ b/webui/packed_assets.go
@@ -1,6 +1,6 @@
// Code generated by vfsgen; DO NOT EDIT.
-// +build !debugwebui
+//go:build !debugwebui
package webui