Detailed changes
@@ -21,9 +21,3 @@ omit_getters: true
models:
ID:
model: github.com/git-bug/git-bug/entity.Id
- Color:
- model: image/color.RGBA
- Identity:
- model: github.com/git-bug/git-bug/api/graphql/models.IdentityWrapper
- Bug:
- model: github.com/git-bug/git-bug/api/graphql/models.BugWrapper
@@ -0,0 +1,1537 @@
+// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
+
+package graph
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "strconv"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/99designs/gqlgen/graphql"
+ "github.com/git-bug/git-bug/api/graphql/models"
+ "github.com/git-bug/git-bug/entity"
+ "github.com/vektah/gqlparser/v2/ast"
+)
+
+// region ************************** generated!.gotpl **************************
+
+type BoardResolver interface {
+ HumanID(ctx context.Context, obj models.BoardWrapper) (string, error)
+
+ Columns(ctx context.Context, obj models.BoardWrapper, after *string, before *string, first *int, last *int) (*models.BoardColumnConnection, error)
+ Actors(ctx context.Context, obj models.BoardWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error)
+ Operations(ctx context.Context, obj models.BoardWrapper, after *string, before *string, first *int, last *int) (*models.OperationConnection, error)
+}
+
+// endregion ************************** generated!.gotpl **************************
+
+// region ***************************** args.gotpl *****************************
+
+func (ec *executionContext) field_Board_actors_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
+ var err error
+ args := map[string]any{}
+ arg0, err := ec.field_Board_actors_argsAfter(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["after"] = arg0
+ arg1, err := ec.field_Board_actors_argsBefore(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["before"] = arg1
+ arg2, err := ec.field_Board_actors_argsFirst(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["first"] = arg2
+ arg3, err := ec.field_Board_actors_argsLast(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["last"] = arg3
+ return args, nil
+}
+func (ec *executionContext) field_Board_actors_argsAfter(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*string, error) {
+ if _, ok := rawArgs["after"]; !ok {
+ var zeroVal *string
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
+ if tmp, ok := rawArgs["after"]; ok {
+ return ec.unmarshalOString2ᚖstring(ctx, tmp)
+ }
+
+ var zeroVal *string
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_actors_argsBefore(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*string, error) {
+ if _, ok := rawArgs["before"]; !ok {
+ var zeroVal *string
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
+ if tmp, ok := rawArgs["before"]; ok {
+ return ec.unmarshalOString2ᚖstring(ctx, tmp)
+ }
+
+ var zeroVal *string
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_actors_argsFirst(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*int, error) {
+ if _, ok := rawArgs["first"]; !ok {
+ var zeroVal *int
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
+ if tmp, ok := rawArgs["first"]; ok {
+ return ec.unmarshalOInt2ᚖint(ctx, tmp)
+ }
+
+ var zeroVal *int
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_actors_argsLast(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*int, error) {
+ if _, ok := rawArgs["last"]; !ok {
+ var zeroVal *int
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
+ if tmp, ok := rawArgs["last"]; ok {
+ return ec.unmarshalOInt2ᚖint(ctx, tmp)
+ }
+
+ var zeroVal *int
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_columns_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
+ var err error
+ args := map[string]any{}
+ arg0, err := ec.field_Board_columns_argsAfter(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["after"] = arg0
+ arg1, err := ec.field_Board_columns_argsBefore(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["before"] = arg1
+ arg2, err := ec.field_Board_columns_argsFirst(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["first"] = arg2
+ arg3, err := ec.field_Board_columns_argsLast(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["last"] = arg3
+ return args, nil
+}
+func (ec *executionContext) field_Board_columns_argsAfter(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*string, error) {
+ if _, ok := rawArgs["after"]; !ok {
+ var zeroVal *string
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
+ if tmp, ok := rawArgs["after"]; ok {
+ return ec.unmarshalOString2ᚖstring(ctx, tmp)
+ }
+
+ var zeroVal *string
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_columns_argsBefore(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*string, error) {
+ if _, ok := rawArgs["before"]; !ok {
+ var zeroVal *string
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
+ if tmp, ok := rawArgs["before"]; ok {
+ return ec.unmarshalOString2ᚖstring(ctx, tmp)
+ }
+
+ var zeroVal *string
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_columns_argsFirst(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*int, error) {
+ if _, ok := rawArgs["first"]; !ok {
+ var zeroVal *int
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
+ if tmp, ok := rawArgs["first"]; ok {
+ return ec.unmarshalOInt2ᚖint(ctx, tmp)
+ }
+
+ var zeroVal *int
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_columns_argsLast(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*int, error) {
+ if _, ok := rawArgs["last"]; !ok {
+ var zeroVal *int
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
+ if tmp, ok := rawArgs["last"]; ok {
+ return ec.unmarshalOInt2ᚖint(ctx, tmp)
+ }
+
+ var zeroVal *int
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_operations_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
+ var err error
+ args := map[string]any{}
+ arg0, err := ec.field_Board_operations_argsAfter(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["after"] = arg0
+ arg1, err := ec.field_Board_operations_argsBefore(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["before"] = arg1
+ arg2, err := ec.field_Board_operations_argsFirst(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["first"] = arg2
+ arg3, err := ec.field_Board_operations_argsLast(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["last"] = arg3
+ return args, nil
+}
+func (ec *executionContext) field_Board_operations_argsAfter(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*string, error) {
+ if _, ok := rawArgs["after"]; !ok {
+ var zeroVal *string
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
+ if tmp, ok := rawArgs["after"]; ok {
+ return ec.unmarshalOString2ᚖstring(ctx, tmp)
+ }
+
+ var zeroVal *string
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_operations_argsBefore(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*string, error) {
+ if _, ok := rawArgs["before"]; !ok {
+ var zeroVal *string
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
+ if tmp, ok := rawArgs["before"]; ok {
+ return ec.unmarshalOString2ᚖstring(ctx, tmp)
+ }
+
+ var zeroVal *string
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_operations_argsFirst(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*int, error) {
+ if _, ok := rawArgs["first"]; !ok {
+ var zeroVal *int
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
+ if tmp, ok := rawArgs["first"]; ok {
+ return ec.unmarshalOInt2ᚖint(ctx, tmp)
+ }
+
+ var zeroVal *int
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_Board_operations_argsLast(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*int, error) {
+ if _, ok := rawArgs["last"]; !ok {
+ var zeroVal *int
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
+ if tmp, ok := rawArgs["last"]; ok {
+ return ec.unmarshalOInt2ᚖint(ctx, tmp)
+ }
+
+ var zeroVal *int
+ return zeroVal, nil
+}
+
+// endregion ***************************** args.gotpl *****************************
+
+// region ************************** directives.gotpl **************************
+
+// endregion ************************** directives.gotpl **************************
+
+// region **************************** field.gotpl *****************************
+
+func (ec *executionContext) _Board_id(ctx context.Context, field graphql.CollectedField, obj models.BoardWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Board_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Id(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.Id)
+ fc.Result = res
+ return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Board_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Board",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Board_humanId(ctx context.Context, field graphql.CollectedField, obj models.BoardWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Board_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Board().HumanID(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Board_humanId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Board",
+ 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) _Board_createdAt(ctx context.Context, field graphql.CollectedField, obj models.BoardWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Board_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CreatedAt(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ fc.Result = res
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Board_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Board",
+ Field: field,
+ 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) _Board_lastEdit(ctx context.Context, field graphql.CollectedField, obj models.BoardWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Board_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.LastEdit(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ fc.Result = res
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Board_lastEdit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Board",
+ Field: field,
+ 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) _Board_title(ctx context.Context, field graphql.CollectedField, obj models.BoardWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Board_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Title(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Board_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Board",
+ 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) _Board_description(ctx context.Context, field graphql.CollectedField, obj models.BoardWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Board_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) (any, 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 {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Board_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Board",
+ 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) _Board_columns(ctx context.Context, field graphql.CollectedField, obj models.BoardWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Board_columns(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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Board().Columns(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)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*models.BoardColumnConnection)
+ fc.Result = res
+ return ec.marshalNBoardColumnConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardColumnConnection(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Board_columns(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Board",
+ 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_BoardColumnConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_BoardColumnConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_BoardColumnConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_BoardColumnConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BoardColumnConnection", 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_Board_columns_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Board_actors(ctx context.Context, field graphql.CollectedField, obj models.BoardWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Board_actors(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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Board().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)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*models.IdentityConnection)
+ fc.Result = res
+ return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Board_actors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Board",
+ 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_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)
+ if fc.Args, err = ec.field_Board_actors_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _Board_operations(ctx context.Context, field graphql.CollectedField, obj models.BoardWrapper) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Board_operations(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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.Board().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)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*models.OperationConnection)
+ fc.Result = res
+ return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_Board_operations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "Board",
+ 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 {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.field_Board_operations_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BoardConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Edges, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*models.BoardEdge)
+ fc.Result = res
+ return ec.marshalNBoardEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardEdgeᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "cursor":
+ return ec.fieldContext_BoardEdge_cursor(ctx, field)
+ case "node":
+ return ec.fieldContext_BoardEdge_node(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BoardEdge", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BoardConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Nodes, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]models.BoardWrapper)
+ fc.Result = res
+ return ec.marshalNBoard2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardWrapperᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardConnection",
+ 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_Board_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Board_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Board_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Board_lastEdit(ctx, field)
+ case "title":
+ return ec.fieldContext_Board_title(ctx, field)
+ case "description":
+ return ec.fieldContext_Board_description(ctx, field)
+ case "columns":
+ return ec.fieldContext_Board_columns(ctx, field)
+ case "actors":
+ return ec.fieldContext_Board_actors(ctx, field)
+ case "operations":
+ return ec.fieldContext_Board_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Board", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BoardConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PageInfo, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*models.PageInfo)
+ fc.Result = res
+ return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardConnection",
+ Field: field,
+ 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) _BoardConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BoardConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TotalCount, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int)
+ fc.Result = res
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardConnection",
+ 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) _BoardEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BoardEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardEdge_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Cursor, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardEdge",
+ 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) _BoardEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BoardEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardEdge_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Node, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.BoardWrapper)
+ fc.Result = res
+ return ec.marshalNBoard2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardWrapper(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardEdge",
+ 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_Board_id(ctx, field)
+ case "humanId":
+ return ec.fieldContext_Board_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Board_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Board_lastEdit(ctx, field)
+ case "title":
+ return ec.fieldContext_Board_title(ctx, field)
+ case "description":
+ return ec.fieldContext_Board_description(ctx, field)
+ case "columns":
+ return ec.fieldContext_Board_columns(ctx, field)
+ case "actors":
+ return ec.fieldContext_Board_actors(ctx, field)
+ case "operations":
+ return ec.fieldContext_Board_operations(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Board", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+// endregion **************************** field.gotpl *****************************
+
+// region **************************** input.gotpl *****************************
+
+// endregion **************************** input.gotpl *****************************
+
+// region ************************** interface.gotpl ***************************
+
+// endregion ************************** interface.gotpl ***************************
+
+// region **************************** object.gotpl ****************************
+
+var boardImplementors = []string{"Board"}
+
+func (ec *executionContext) _Board(ctx context.Context, sel ast.SelectionSet, obj models.BoardWrapper) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Board")
+ case "id":
+ out.Values[i] = ec._Board_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "humanId":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Board_humanId(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "createdAt":
+ out.Values[i] = ec._Board_createdAt(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "lastEdit":
+ out.Values[i] = ec._Board_lastEdit(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "title":
+ out.Values[i] = ec._Board_title(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "description":
+ out.Values[i] = ec._Board_description(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "columns":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Board_columns(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "actors":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Board_actors(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "operations":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._Board_operations(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardConnectionImplementors = []string{"BoardConnection"}
+
+func (ec *executionContext) _BoardConnection(ctx context.Context, sel ast.SelectionSet, obj *models.BoardConnection) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardConnectionImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardConnection")
+ case "edges":
+ out.Values[i] = ec._BoardConnection_edges(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "nodes":
+ out.Values[i] = ec._BoardConnection_nodes(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "pageInfo":
+ out.Values[i] = ec._BoardConnection_pageInfo(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "totalCount":
+ out.Values[i] = ec._BoardConnection_totalCount(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardEdgeImplementors = []string{"BoardEdge"}
+
+func (ec *executionContext) _BoardEdge(ctx context.Context, sel ast.SelectionSet, obj *models.BoardEdge) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardEdgeImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardEdge")
+ case "cursor":
+ out.Values[i] = ec._BoardEdge_cursor(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "node":
+ out.Values[i] = ec._BoardEdge_node(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+// endregion **************************** object.gotpl ****************************
+
+// region ***************************** type.gotpl *****************************
+
+func (ec *executionContext) marshalNBoard2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardWrapper(ctx context.Context, sel ast.SelectionSet, v models.BoardWrapper) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._Board(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNBoard2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.BoardWrapper) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNBoard2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardWrapper(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNBoardEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.BoardEdge) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNBoardEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardEdge(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNBoardEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardEdge(ctx context.Context, sel ast.SelectionSet, v *models.BoardEdge) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._BoardEdge(ctx, sel, v)
+}
+
+// endregion ***************************** type.gotpl *****************************
@@ -0,0 +1,900 @@
+// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
+
+package graph
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "strconv"
+ "sync"
+ "sync/atomic"
+
+ "github.com/99designs/gqlgen/graphql"
+ "github.com/git-bug/git-bug/api/graphql/models"
+ "github.com/git-bug/git-bug/entities/board"
+ "github.com/git-bug/git-bug/entity"
+ "github.com/vektah/gqlparser/v2/ast"
+)
+
+// region ************************** generated!.gotpl **************************
+
+type BoardColumnResolver interface {
+ Items(ctx context.Context, obj *board.Column, after *string, before *string, first *int, last *int) (*models.BoardItemConnection, error)
+}
+
+// endregion ************************** generated!.gotpl **************************
+
+// region ***************************** args.gotpl *****************************
+
+func (ec *executionContext) field_BoardColumn_items_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
+ var err error
+ args := map[string]any{}
+ arg0, err := ec.field_BoardColumn_items_argsAfter(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["after"] = arg0
+ arg1, err := ec.field_BoardColumn_items_argsBefore(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["before"] = arg1
+ arg2, err := ec.field_BoardColumn_items_argsFirst(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["first"] = arg2
+ arg3, err := ec.field_BoardColumn_items_argsLast(ctx, rawArgs)
+ if err != nil {
+ return nil, err
+ }
+ args["last"] = arg3
+ return args, nil
+}
+func (ec *executionContext) field_BoardColumn_items_argsAfter(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*string, error) {
+ if _, ok := rawArgs["after"]; !ok {
+ var zeroVal *string
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
+ if tmp, ok := rawArgs["after"]; ok {
+ return ec.unmarshalOString2ᚖstring(ctx, tmp)
+ }
+
+ var zeroVal *string
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_BoardColumn_items_argsBefore(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*string, error) {
+ if _, ok := rawArgs["before"]; !ok {
+ var zeroVal *string
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
+ if tmp, ok := rawArgs["before"]; ok {
+ return ec.unmarshalOString2ᚖstring(ctx, tmp)
+ }
+
+ var zeroVal *string
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_BoardColumn_items_argsFirst(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*int, error) {
+ if _, ok := rawArgs["first"]; !ok {
+ var zeroVal *int
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
+ if tmp, ok := rawArgs["first"]; ok {
+ return ec.unmarshalOInt2ᚖint(ctx, tmp)
+ }
+
+ var zeroVal *int
+ return zeroVal, nil
+}
+
+func (ec *executionContext) field_BoardColumn_items_argsLast(
+ ctx context.Context,
+ rawArgs map[string]any,
+) (*int, error) {
+ if _, ok := rawArgs["last"]; !ok {
+ var zeroVal *int
+ return zeroVal, nil
+ }
+
+ ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
+ if tmp, ok := rawArgs["last"]; ok {
+ return ec.unmarshalOInt2ᚖint(ctx, tmp)
+ }
+
+ var zeroVal *int
+ return zeroVal, nil
+}
+
+// endregion ***************************** args.gotpl *****************************
+
+// region ************************** directives.gotpl **************************
+
+// endregion ************************** directives.gotpl **************************
+
+// region **************************** field.gotpl *****************************
+
+func (ec *executionContext) _BoardColumn_id(ctx context.Context, field graphql.CollectedField, obj *board.Column) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardColumn_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CombinedId, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.CombinedId)
+ fc.Result = res
+ return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardColumn_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardColumn",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type CombinedId does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardColumn_name(ctx context.Context, field graphql.CollectedField, obj *board.Column) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardColumn_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardColumn_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardColumn",
+ 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) _BoardColumn_items(ctx context.Context, field graphql.CollectedField, obj *board.Column) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardColumn_items(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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardColumn().Items(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)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*models.BoardItemConnection)
+ fc.Result = res
+ return ec.marshalNBoardItemConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemConnection(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardColumn_items(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardColumn",
+ 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_BoardItemConnection_edges(ctx, field)
+ case "nodes":
+ return ec.fieldContext_BoardItemConnection_nodes(ctx, field)
+ case "pageInfo":
+ return ec.fieldContext_BoardItemConnection_pageInfo(ctx, field)
+ case "totalCount":
+ return ec.fieldContext_BoardItemConnection_totalCount(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BoardItemConnection", 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_BoardColumn_items_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return fc, err
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardColumnConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BoardColumnConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardColumnConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Edges, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*models.BoardColumnEdge)
+ fc.Result = res
+ return ec.marshalNBoardColumnEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardColumnEdgeᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardColumnConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardColumnConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "cursor":
+ return ec.fieldContext_BoardColumnEdge_cursor(ctx, field)
+ case "node":
+ return ec.fieldContext_BoardColumnEdge_node(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BoardColumnEdge", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardColumnConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BoardColumnConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardColumnConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Nodes, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*board.Column)
+ fc.Result = res
+ return ec.marshalNBoardColumn2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐColumnᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardColumnConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardColumnConnection",
+ 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_BoardColumn_id(ctx, field)
+ case "name":
+ return ec.fieldContext_BoardColumn_name(ctx, field)
+ case "items":
+ return ec.fieldContext_BoardColumn_items(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BoardColumn", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardColumnConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BoardColumnConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardColumnConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PageInfo, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*models.PageInfo)
+ fc.Result = res
+ return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardColumnConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardColumnConnection",
+ Field: field,
+ 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) _BoardColumnConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BoardColumnConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardColumnConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TotalCount, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int)
+ fc.Result = res
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardColumnConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardColumnConnection",
+ 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) _BoardColumnEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BoardColumnEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardColumnEdge_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Cursor, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardColumnEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardColumnEdge",
+ 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) _BoardColumnEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BoardColumnEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardColumnEdge_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Node, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*board.Column)
+ fc.Result = res
+ return ec.marshalNBoardColumn2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐColumn(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardColumnEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardColumnEdge",
+ 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_BoardColumn_id(ctx, field)
+ case "name":
+ return ec.fieldContext_BoardColumn_name(ctx, field)
+ case "items":
+ return ec.fieldContext_BoardColumn_items(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BoardColumn", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+// endregion **************************** field.gotpl *****************************
+
+// region **************************** input.gotpl *****************************
+
+// endregion **************************** input.gotpl *****************************
+
+// region ************************** interface.gotpl ***************************
+
+// endregion ************************** interface.gotpl ***************************
+
+// region **************************** object.gotpl ****************************
+
+var boardColumnImplementors = []string{"BoardColumn"}
+
+func (ec *executionContext) _BoardColumn(ctx context.Context, sel ast.SelectionSet, obj *board.Column) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardColumnImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardColumn")
+ case "id":
+ out.Values[i] = ec._BoardColumn_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "name":
+ out.Values[i] = ec._BoardColumn_name(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "items":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardColumn_items(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardColumnConnectionImplementors = []string{"BoardColumnConnection"}
+
+func (ec *executionContext) _BoardColumnConnection(ctx context.Context, sel ast.SelectionSet, obj *models.BoardColumnConnection) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardColumnConnectionImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardColumnConnection")
+ case "edges":
+ out.Values[i] = ec._BoardColumnConnection_edges(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "nodes":
+ out.Values[i] = ec._BoardColumnConnection_nodes(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "pageInfo":
+ out.Values[i] = ec._BoardColumnConnection_pageInfo(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "totalCount":
+ out.Values[i] = ec._BoardColumnConnection_totalCount(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardColumnEdgeImplementors = []string{"BoardColumnEdge"}
+
+func (ec *executionContext) _BoardColumnEdge(ctx context.Context, sel ast.SelectionSet, obj *models.BoardColumnEdge) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardColumnEdgeImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardColumnEdge")
+ case "cursor":
+ out.Values[i] = ec._BoardColumnEdge_cursor(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "node":
+ out.Values[i] = ec._BoardColumnEdge_node(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+// endregion **************************** object.gotpl ****************************
+
+// region ***************************** type.gotpl *****************************
+
+func (ec *executionContext) marshalNBoardColumn2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐColumnᚄ(ctx context.Context, sel ast.SelectionSet, v []*board.Column) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNBoardColumn2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐColumn(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNBoardColumn2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐColumn(ctx context.Context, sel ast.SelectionSet, v *board.Column) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._BoardColumn(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNBoardColumnConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardColumnConnection(ctx context.Context, sel ast.SelectionSet, v models.BoardColumnConnection) graphql.Marshaler {
+ return ec._BoardColumnConnection(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNBoardColumnConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardColumnConnection(ctx context.Context, sel ast.SelectionSet, v *models.BoardColumnConnection) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._BoardColumnConnection(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNBoardColumnEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardColumnEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.BoardColumnEdge) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNBoardColumnEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardColumnEdge(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNBoardColumnEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardColumnEdge(ctx context.Context, sel ast.SelectionSet, v *models.BoardColumnEdge) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._BoardColumnEdge(ctx, sel, v)
+}
+
+// endregion ***************************** type.gotpl *****************************
@@ -0,0 +1,1180 @@
+// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
+
+package graph
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "strconv"
+ "sync"
+ "sync/atomic"
+
+ "github.com/99designs/gqlgen/graphql"
+ "github.com/git-bug/git-bug/api/graphql/models"
+ "github.com/git-bug/git-bug/entities/board"
+ "github.com/git-bug/git-bug/entities/common"
+ "github.com/git-bug/git-bug/entity"
+ "github.com/vektah/gqlparser/v2/ast"
+)
+
+// region ************************** generated!.gotpl **************************
+
+type BoardItemBugResolver interface {
+ Author(ctx context.Context, obj *board.BugItem) (models.IdentityWrapper, error)
+}
+type BoardItemDraftResolver interface {
+ Author(ctx context.Context, obj *board.Draft) (models.IdentityWrapper, error)
+
+ Labels(ctx context.Context, obj *board.Draft) ([]common.Label, error)
+}
+
+// endregion ************************** generated!.gotpl **************************
+
+// region ***************************** args.gotpl *****************************
+
+// endregion ***************************** args.gotpl *****************************
+
+// region ************************** directives.gotpl **************************
+
+// endregion ************************** directives.gotpl **************************
+
+// region **************************** field.gotpl *****************************
+
+func (ec *executionContext) _BoardItemBug_id(ctx context.Context, field graphql.CollectedField, obj *board.BugItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemBug_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CombinedId(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.CombinedId)
+ fc.Result = res
+ return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemBug_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemBug",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type CombinedId does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardItemBug_author(ctx context.Context, field graphql.CollectedField, obj *board.BugItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemBug_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardItemBug().Author(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.IdentityWrapper)
+ fc.Result = res
+ return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemBug_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemBug",
+ 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) _BoardItemBug_title(ctx context.Context, field graphql.CollectedField, obj *board.BugItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemBug_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Title(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemBug_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemBug",
+ 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) _BoardItemBug_labels(ctx context.Context, field graphql.CollectedField, obj *board.BugItem) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemBug_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Labels(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]common.Label)
+ fc.Result = res
+ return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemBug_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemBug",
+ 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_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) _BoardItemConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Edges, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]*models.BoardItemEdge)
+ fc.Result = res
+ return ec.marshalNBoardItemEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEdgeᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemConnection",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "cursor":
+ return ec.fieldContext_BoardItemEdge_cursor(ctx, field)
+ case "node":
+ return ec.fieldContext_BoardItemEdge_node(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type BoardItemEdge", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Nodes, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]board.Item)
+ fc.Result = res
+ return ec.marshalNBoardItem2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItemᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemConnection",
+ 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) _BoardItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.PageInfo, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(*models.PageInfo)
+ fc.Result = res
+ return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemConnection",
+ Field: field,
+ 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) _BoardItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemConnection) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemConnection_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.TotalCount, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int)
+ fc.Result = res
+ return ec.marshalNInt2int(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemConnection",
+ 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) _BoardItemDraft_id(ctx context.Context, field graphql.CollectedField, obj *board.Draft) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemDraft_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.CombinedId(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.CombinedId)
+ fc.Result = res
+ return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemDraft_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemDraft",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type CombinedId does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardItemDraft_author(ctx context.Context, field graphql.CollectedField, obj *board.Draft) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemDraft_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardItemDraft().Author(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.IdentityWrapper)
+ fc.Result = res
+ return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemDraft_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemDraft",
+ 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) _BoardItemDraft_title(ctx context.Context, field graphql.CollectedField, obj *board.Draft) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemDraft_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Title(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemDraft_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemDraft",
+ 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) _BoardItemDraft_labels(ctx context.Context, field graphql.CollectedField, obj *board.Draft) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemDraft_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardItemDraft().Labels(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]common.Label)
+ fc.Result = res
+ return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemDraft_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemDraft",
+ 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_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) _BoardItemEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemEdge_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Cursor, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemEdge",
+ 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) _BoardItemEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemEdge) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardItemEdge_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Node, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(board.Item)
+ fc.Result = res
+ return ec.marshalNBoardItem2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItem(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardItemEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardItemEdge",
+ 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
+}
+
+// endregion **************************** field.gotpl *****************************
+
+// region **************************** input.gotpl *****************************
+
+// endregion **************************** input.gotpl *****************************
+
+// region ************************** interface.gotpl ***************************
+
+func (ec *executionContext) _BoardItem(ctx context.Context, sel ast.SelectionSet, obj board.Item) graphql.Marshaler {
+ switch obj := (obj).(type) {
+ case nil:
+ return graphql.Null
+ case *board.Draft:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardItemDraft(ctx, sel, obj)
+ case *board.BugItem:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardItemBug(ctx, sel, obj)
+ default:
+ panic(fmt.Errorf("unexpected type %T", obj))
+ }
+}
+
+// endregion ************************** interface.gotpl ***************************
+
+// region **************************** object.gotpl ****************************
+
+var boardItemBugImplementors = []string{"BoardItemBug", "BoardItem", "Authored"}
+
+func (ec *executionContext) _BoardItemBug(ctx context.Context, sel ast.SelectionSet, obj *board.BugItem) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardItemBugImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardItemBug")
+ case "id":
+ out.Values[i] = ec._BoardItemBug_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "author":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardItemBug_author(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "title":
+ out.Values[i] = ec._BoardItemBug_title(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "labels":
+ out.Values[i] = ec._BoardItemBug_labels(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardItemConnectionImplementors = []string{"BoardItemConnection"}
+
+func (ec *executionContext) _BoardItemConnection(ctx context.Context, sel ast.SelectionSet, obj *models.BoardItemConnection) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardItemConnectionImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardItemConnection")
+ case "edges":
+ out.Values[i] = ec._BoardItemConnection_edges(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "nodes":
+ out.Values[i] = ec._BoardItemConnection_nodes(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "pageInfo":
+ out.Values[i] = ec._BoardItemConnection_pageInfo(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "totalCount":
+ out.Values[i] = ec._BoardItemConnection_totalCount(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardItemDraftImplementors = []string{"BoardItemDraft", "BoardItem", "Authored"}
+
+func (ec *executionContext) _BoardItemDraft(ctx context.Context, sel ast.SelectionSet, obj *board.Draft) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardItemDraftImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardItemDraft")
+ case "id":
+ out.Values[i] = ec._BoardItemDraft_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "author":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardItemDraft_author(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "title":
+ out.Values[i] = ec._BoardItemDraft_title(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "labels":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardItemDraft_labels(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardItemEdgeImplementors = []string{"BoardItemEdge"}
+
+func (ec *executionContext) _BoardItemEdge(ctx context.Context, sel ast.SelectionSet, obj *models.BoardItemEdge) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardItemEdgeImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardItemEdge")
+ case "cursor":
+ out.Values[i] = ec._BoardItemEdge_cursor(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "node":
+ out.Values[i] = ec._BoardItemEdge_node(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+// endregion **************************** object.gotpl ****************************
+
+// region ***************************** type.gotpl *****************************
+
+func (ec *executionContext) marshalNBoardItem2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItem(ctx context.Context, sel ast.SelectionSet, v board.Item) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._BoardItem(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNBoardItem2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItemᚄ(ctx context.Context, sel ast.SelectionSet, v []board.Item) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNBoardItem2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItem(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNBoardItemConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemConnection(ctx context.Context, sel ast.SelectionSet, v models.BoardItemConnection) graphql.Marshaler {
+ return ec._BoardItemConnection(ctx, sel, &v)
+}
+
+func (ec *executionContext) marshalNBoardItemConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemConnection(ctx context.Context, sel ast.SelectionSet, v *models.BoardItemConnection) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._BoardItemConnection(ctx, sel, v)
+}
+
+func (ec *executionContext) marshalNBoardItemEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.BoardItemEdge) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ var wg sync.WaitGroup
+ isLen1 := len(v) == 1
+ if !isLen1 {
+ wg.Add(len(v))
+ }
+ for i := range v {
+ i := i
+ fc := &graphql.FieldContext{
+ Index: &i,
+ Result: &v[i],
+ }
+ ctx := graphql.WithFieldContext(ctx, fc)
+ f := func(i int) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = nil
+ }
+ }()
+ if !isLen1 {
+ defer wg.Done()
+ }
+ ret[i] = ec.marshalNBoardItemEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEdge(ctx, sel, v[i])
+ }
+ if isLen1 {
+ f(i)
+ } else {
+ go f(i)
+ }
+
+ }
+ wg.Wait()
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
+func (ec *executionContext) marshalNBoardItemEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEdge(ctx context.Context, sel ast.SelectionSet, v *models.BoardItemEdge) graphql.Marshaler {
+ if v == nil {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ return graphql.Null
+ }
+ return ec._BoardItemEdge(ctx, sel, v)
+}
+
+// endregion ***************************** type.gotpl *****************************
@@ -0,0 +1,1847 @@
+// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
+
+package graph
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "strconv"
+ "sync/atomic"
+ "time"
+
+ "github.com/99designs/gqlgen/graphql"
+ "github.com/git-bug/git-bug/api/graphql/models"
+ "github.com/git-bug/git-bug/entities/board"
+ "github.com/git-bug/git-bug/entity"
+ "github.com/vektah/gqlparser/v2/ast"
+)
+
+// region ************************** generated!.gotpl **************************
+
+type BoardAddItemDraftOperationResolver interface {
+ Author(ctx context.Context, obj *board.AddItemDraftOperation) (models.IdentityWrapper, error)
+}
+type BoardAddItemEntityOperationResolver interface {
+ Author(ctx context.Context, obj *board.AddItemEntityOperation) (models.IdentityWrapper, error)
+
+ EntityType(ctx context.Context, obj *board.AddItemEntityOperation) (models.BoardItemEntityType, error)
+}
+type BoardCreateOperationResolver interface {
+ Author(ctx context.Context, obj *board.CreateOperation) (models.IdentityWrapper, error)
+}
+type BoardSetDescriptionOperationResolver interface {
+ Author(ctx context.Context, obj *board.SetDescriptionOperation) (models.IdentityWrapper, error)
+}
+type BoardSetTitleOperationResolver interface {
+ Author(ctx context.Context, obj *board.SetTitleOperation) (models.IdentityWrapper, error)
+}
+
+// endregion ************************** generated!.gotpl **************************
+
+// region ***************************** args.gotpl *****************************
+
+// endregion ***************************** args.gotpl *****************************
+
+// region ************************** directives.gotpl **************************
+
+// endregion ************************** directives.gotpl **************************
+
+// region **************************** field.gotpl *****************************
+
+func (ec *executionContext) _BoardAddItemDraftOperation_id(ctx context.Context, field graphql.CollectedField, obj *board.AddItemDraftOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemDraftOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Id(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.Id)
+ fc.Result = res
+ return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemDraftOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemDraftOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardAddItemDraftOperation_author(ctx context.Context, field graphql.CollectedField, obj *board.AddItemDraftOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemDraftOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardAddItemDraftOperation().Author(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.IdentityWrapper)
+ fc.Result = res
+ return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemDraftOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemDraftOperation",
+ 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) _BoardAddItemDraftOperation_date(ctx context.Context, field graphql.CollectedField, obj *board.AddItemDraftOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemDraftOperation_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Time(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ fc.Result = res
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemDraftOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemDraftOperation",
+ Field: field,
+ 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) _BoardAddItemDraftOperation_columnId(ctx context.Context, field graphql.CollectedField, obj *board.AddItemDraftOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemDraftOperation_columnId(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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ColumnId, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.Id)
+ fc.Result = res
+ return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemDraftOperation_columnId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemDraftOperation",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardAddItemDraftOperation_title(ctx context.Context, field graphql.CollectedField, obj *board.AddItemDraftOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemDraftOperation_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Title, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemDraftOperation_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemDraftOperation",
+ 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) _BoardAddItemEntityOperation_id(ctx context.Context, field graphql.CollectedField, obj *board.AddItemEntityOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemEntityOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Id(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.Id)
+ fc.Result = res
+ return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemEntityOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemEntityOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardAddItemEntityOperation_author(ctx context.Context, field graphql.CollectedField, obj *board.AddItemEntityOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemEntityOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardAddItemEntityOperation().Author(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.IdentityWrapper)
+ fc.Result = res
+ return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemEntityOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemEntityOperation",
+ 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) _BoardAddItemEntityOperation_date(ctx context.Context, field graphql.CollectedField, obj *board.AddItemEntityOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemEntityOperation_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Time(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ fc.Result = res
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemEntityOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemEntityOperation",
+ Field: field,
+ 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) _BoardAddItemEntityOperation_columnId(ctx context.Context, field graphql.CollectedField, obj *board.AddItemEntityOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemEntityOperation_columnId(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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.ColumnId, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.Id)
+ fc.Result = res
+ return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemEntityOperation_columnId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemEntityOperation",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardAddItemEntityOperation_entityType(ctx context.Context, field graphql.CollectedField, obj *board.AddItemEntityOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemEntityOperation_entityType(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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardAddItemEntityOperation().EntityType(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.BoardItemEntityType)
+ fc.Result = res
+ return ec.marshalNBoardItemEntityType2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEntityType(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemEntityOperation_entityType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemEntityOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type BoardItemEntityType does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardAddItemEntityOperation_entityId(ctx context.Context, field graphql.CollectedField, obj *board.AddItemEntityOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardAddItemEntityOperation_entityId(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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.EntityId, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.Id)
+ fc.Result = res
+ return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardAddItemEntityOperation_entityId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardAddItemEntityOperation",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardCreateOperation_id(ctx context.Context, field graphql.CollectedField, obj *board.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardCreateOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Id(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.Id)
+ fc.Result = res
+ return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardCreateOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardCreateOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardCreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *board.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardCreateOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardCreateOperation().Author(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.IdentityWrapper)
+ fc.Result = res
+ return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardCreateOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardCreateOperation",
+ 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) _BoardCreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *board.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardCreateOperation_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Time(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ fc.Result = res
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardCreateOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardCreateOperation",
+ Field: field,
+ 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) _BoardCreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *board.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardCreateOperation_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Title, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardCreateOperation_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardCreateOperation",
+ 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) _BoardCreateOperation_description(ctx context.Context, field graphql.CollectedField, obj *board.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardCreateOperation_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) (any, 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 {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardCreateOperation_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardCreateOperation",
+ 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) _BoardCreateOperation_columns(ctx context.Context, field graphql.CollectedField, obj *board.CreateOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardCreateOperation_columns(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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Columns, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]string)
+ fc.Result = res
+ return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardCreateOperation_columns(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardCreateOperation",
+ 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) _BoardSetDescriptionOperation_id(ctx context.Context, field graphql.CollectedField, obj *board.SetDescriptionOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetDescriptionOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Id(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.Id)
+ fc.Result = res
+ return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetDescriptionOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetDescriptionOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardSetDescriptionOperation_author(ctx context.Context, field graphql.CollectedField, obj *board.SetDescriptionOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetDescriptionOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardSetDescriptionOperation().Author(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.IdentityWrapper)
+ fc.Result = res
+ return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetDescriptionOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetDescriptionOperation",
+ 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) _BoardSetDescriptionOperation_date(ctx context.Context, field graphql.CollectedField, obj *board.SetDescriptionOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetDescriptionOperation_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Time(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ fc.Result = res
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetDescriptionOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetDescriptionOperation",
+ Field: field,
+ 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) _BoardSetDescriptionOperation_description(ctx context.Context, field graphql.CollectedField, obj *board.SetDescriptionOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetDescriptionOperation_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) (any, 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 {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetDescriptionOperation_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetDescriptionOperation",
+ 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) _BoardSetDescriptionOperation_was(ctx context.Context, field graphql.CollectedField, obj *board.SetDescriptionOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetDescriptionOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Was, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetDescriptionOperation_was(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetDescriptionOperation",
+ 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) _BoardSetTitleOperation_id(ctx context.Context, field graphql.CollectedField, obj *board.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetTitleOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Id(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(entity.Id)
+ fc.Result = res
+ return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetTitleOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetTitleOperation",
+ Field: field,
+ IsMethod: true,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type ID does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _BoardSetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *board.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetTitleOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.BoardSetTitleOperation().Author(rctx, obj)
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.IdentityWrapper)
+ fc.Result = res
+ return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetTitleOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetTitleOperation",
+ 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) _BoardSetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *board.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetTitleOperation_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Time(), nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ fc.Result = res
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetTitleOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetTitleOperation",
+ Field: field,
+ 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) _BoardSetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *board.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetTitleOperation_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
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Title, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetTitleOperation_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetTitleOperation",
+ 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) _BoardSetTitleOperation_was(ctx context.Context, field graphql.CollectedField, obj *board.SetTitleOperation) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_BoardSetTitleOperation_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) (any, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Was, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_BoardSetTitleOperation_was(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "BoardSetTitleOperation",
+ 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
+}
+
+// endregion **************************** field.gotpl *****************************
+
+// region **************************** input.gotpl *****************************
+
+// endregion **************************** input.gotpl *****************************
+
+// region ************************** interface.gotpl ***************************
+
+// endregion ************************** interface.gotpl ***************************
+
+// region **************************** object.gotpl ****************************
+
+var boardAddItemDraftOperationImplementors = []string{"BoardAddItemDraftOperation", "Operation", "Authored"}
+
+func (ec *executionContext) _BoardAddItemDraftOperation(ctx context.Context, sel ast.SelectionSet, obj *board.AddItemDraftOperation) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardAddItemDraftOperationImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardAddItemDraftOperation")
+ case "id":
+ out.Values[i] = ec._BoardAddItemDraftOperation_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "author":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardAddItemDraftOperation_author(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "date":
+ out.Values[i] = ec._BoardAddItemDraftOperation_date(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "columnId":
+ out.Values[i] = ec._BoardAddItemDraftOperation_columnId(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "title":
+ out.Values[i] = ec._BoardAddItemDraftOperation_title(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardAddItemEntityOperationImplementors = []string{"BoardAddItemEntityOperation", "Operation", "Authored"}
+
+func (ec *executionContext) _BoardAddItemEntityOperation(ctx context.Context, sel ast.SelectionSet, obj *board.AddItemEntityOperation) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardAddItemEntityOperationImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardAddItemEntityOperation")
+ case "id":
+ out.Values[i] = ec._BoardAddItemEntityOperation_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "author":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardAddItemEntityOperation_author(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "date":
+ out.Values[i] = ec._BoardAddItemEntityOperation_date(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "columnId":
+ out.Values[i] = ec._BoardAddItemEntityOperation_columnId(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "entityType":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardAddItemEntityOperation_entityType(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "entityId":
+ out.Values[i] = ec._BoardAddItemEntityOperation_entityId(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardCreateOperationImplementors = []string{"BoardCreateOperation", "Operation", "Authored"}
+
+func (ec *executionContext) _BoardCreateOperation(ctx context.Context, sel ast.SelectionSet, obj *board.CreateOperation) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardCreateOperationImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardCreateOperation")
+ case "id":
+ out.Values[i] = ec._BoardCreateOperation_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "author":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardCreateOperation_author(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "date":
+ out.Values[i] = ec._BoardCreateOperation_date(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "title":
+ out.Values[i] = ec._BoardCreateOperation_title(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "description":
+ out.Values[i] = ec._BoardCreateOperation_description(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "columns":
+ out.Values[i] = ec._BoardCreateOperation_columns(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardSetDescriptionOperationImplementors = []string{"BoardSetDescriptionOperation", "Operation", "Authored"}
+
+func (ec *executionContext) _BoardSetDescriptionOperation(ctx context.Context, sel ast.SelectionSet, obj *board.SetDescriptionOperation) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardSetDescriptionOperationImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardSetDescriptionOperation")
+ case "id":
+ out.Values[i] = ec._BoardSetDescriptionOperation_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "author":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardSetDescriptionOperation_author(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "date":
+ out.Values[i] = ec._BoardSetDescriptionOperation_date(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "description":
+ out.Values[i] = ec._BoardSetDescriptionOperation_description(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "was":
+ out.Values[i] = ec._BoardSetDescriptionOperation_was(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var boardSetTitleOperationImplementors = []string{"BoardSetTitleOperation", "Operation", "Authored"}
+
+func (ec *executionContext) _BoardSetTitleOperation(ctx context.Context, sel ast.SelectionSet, obj *board.SetTitleOperation) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, boardSetTitleOperationImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("BoardSetTitleOperation")
+ case "id":
+ out.Values[i] = ec._BoardSetTitleOperation_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "author":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._BoardSetTitleOperation_author(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "date":
+ out.Values[i] = ec._BoardSetTitleOperation_date(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "title":
+ out.Values[i] = ec._BoardSetTitleOperation_title(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "was":
+ out.Values[i] = ec._BoardSetTitleOperation_was(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+// endregion **************************** object.gotpl ****************************
+
+// region ***************************** type.gotpl *****************************
+
+func (ec *executionContext) unmarshalNBoardItemEntityType2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEntityType(ctx context.Context, v any) (models.BoardItemEntityType, error) {
+ var res models.BoardItemEntityType
+ err := res.UnmarshalGQL(v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNBoardItemEntityType2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEntityType(ctx context.Context, sel ast.SelectionSet, v models.BoardItemEntityType) graphql.Marshaler {
+ return v
+}
+
+// endregion ***************************** type.gotpl *****************************
@@ -615,8 +615,8 @@ func (ec *executionContext) fieldContext_Bug_humanId(_ context.Context, field gr
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)
+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
}
@@ -629,7 +629,7 @@ func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.Colle
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Status(), nil
+ return obj.CreatedAt(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -641,26 +641,26 @@ func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.Colle
}
return graphql.Null
}
- res := resTmp.(common.Status)
+ res := resTmp.(time.Time)
fc.Result = res
- return ec.marshalNStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res)
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Bug_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_Bug_createdAt(_ 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) {
- return nil, errors.New("field of type Status does not have child fields")
+ return nil, errors.New("field of type Time 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)
+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
}
@@ -673,7 +673,7 @@ func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.Collec
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Title(), nil
+ return obj.LastEdit(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -685,26 +685,26 @@ func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.Collec
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(time.Time)
fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
+ return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Bug_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_Bug_lastEdit(_ 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) {
- return nil, errors.New("field of type String does not have child fields")
+ return nil, errors.New("field of type Time 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)
+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
}
@@ -717,7 +717,7 @@ func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.Colle
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Labels(), nil
+ return obj.Status(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -729,32 +729,26 @@ func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.Colle
}
return graphql.Null
}
- res := resTmp.([]common.Label)
+ res := resTmp.(common.Status)
fc.Result = res
- return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res)
+ return ec.marshalNStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Bug_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_Bug_status(_ 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 "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 nil, errors.New("field of type Status does not have child fields")
},
}
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)
+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
}
@@ -767,7 +761,7 @@ func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.Colle
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
- return obj.Author()
+ return obj.Title(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -779,44 +773,26 @@ func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.Colle
}
return graphql.Null
}
- res := resTmp.(models.IdentityWrapper)
+ res := resTmp.(string)
fc.Result = res
- return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
+ return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Bug_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_Bug_title(_ 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 nil, errors.New("field of type String does not have child fields")
},
}
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)
+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
}
@@ -829,7 +805,7 @@ func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.Co
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
- return obj.CreatedAt(), nil
+ return obj.Labels(), nil
})
if err != nil {
ec.Error(ctx, err)
@@ -841,26 +817,32 @@ func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.Co
}
return graphql.Null
}
- res := resTmp.(time.Time)
+ res := resTmp.([]common.Label)
fc.Result = res
- return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+ return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Bug_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_Bug_labels(_ 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) {
- return nil, errors.New("field of type Time does not have child fields")
+ 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_lastEdit(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_Bug_lastEdit(ctx, field)
+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
}
@@ -873,7 +855,7 @@ func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.Col
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
ctx = rctx // use context from middleware stack in children
- return obj.LastEdit(), nil
+ return obj.Author()
})
if err != nil {
ec.Error(ctx, err)
@@ -885,19 +867,37 @@ func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.Col
}
return graphql.Null
}
- res := resTmp.(time.Time)
+ res := resTmp.(models.IdentityWrapper)
fc.Result = res
- return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
+ return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Bug_lastEdit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_Bug_author(_ 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) {
- return nil, errors.New("field of type Time does not have child fields")
+ 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
@@ -1321,6 +1321,10 @@ func (ec *executionContext) fieldContext_BugConnection_nodes(_ context.Context,
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -1329,10 +1333,6 @@ func (ec *executionContext) fieldContext_BugConnection_nodes(_ context.Context,
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":
@@ -1535,6 +1535,10 @@ func (ec *executionContext) fieldContext_BugEdge_node(_ context.Context, field g
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -1543,10 +1547,6 @@ func (ec *executionContext) fieldContext_BugEdge_node(_ context.Context, field g
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":
@@ -1628,6 +1628,16 @@ func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ case "createdAt":
+ out.Values[i] = ec._Bug_createdAt(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "lastEdit":
+ out.Values[i] = ec._Bug_lastEdit(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
case "status":
out.Values[i] = ec._Bug_status(ctx, field, obj)
if out.Values[i] == graphql.Null {
@@ -1648,16 +1658,6 @@ func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj
if out.Values[i] == graphql.Null {
atomic.AddUint32(&out.Invalids, 1)
}
- case "createdAt":
- out.Values[i] = ec._Bug_createdAt(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&out.Invalids, 1)
- }
- case "lastEdit":
- out.Values[i] = ec._Bug_lastEdit(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- atomic.AddUint32(&out.Invalids, 1)
- }
case "actors":
field := field
@@ -113,6 +113,10 @@ func (ec *executionContext) fieldContext_BugAddCommentAndClosePayload_bug(_ cont
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -121,10 +125,6 @@ func (ec *executionContext) fieldContext_BugAddCommentAndClosePayload_bug(_ cont
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":
@@ -336,6 +336,10 @@ func (ec *executionContext) fieldContext_BugAddCommentAndReopenPayload_bug(_ con
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -344,10 +348,6 @@ func (ec *executionContext) fieldContext_BugAddCommentAndReopenPayload_bug(_ con
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":
@@ -559,6 +559,10 @@ func (ec *executionContext) fieldContext_BugAddCommentPayload_bug(_ context.Cont
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -567,10 +571,6 @@ func (ec *executionContext) fieldContext_BugAddCommentPayload_bug(_ context.Cont
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":
@@ -728,6 +728,10 @@ func (ec *executionContext) fieldContext_BugChangeLabelPayload_bug(_ context.Con
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -736,10 +740,6 @@ func (ec *executionContext) fieldContext_BugChangeLabelPayload_bug(_ context.Con
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":
@@ -947,6 +947,10 @@ func (ec *executionContext) fieldContext_BugCreatePayload_bug(_ context.Context,
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -955,10 +959,6 @@ func (ec *executionContext) fieldContext_BugCreatePayload_bug(_ context.Context,
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":
@@ -1118,6 +1118,10 @@ func (ec *executionContext) fieldContext_BugEditCommentPayload_bug(_ context.Con
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -1126,10 +1130,6 @@ func (ec *executionContext) fieldContext_BugEditCommentPayload_bug(_ context.Con
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":
@@ -1289,6 +1289,10 @@ func (ec *executionContext) fieldContext_BugSetTitlePayload_bug(_ context.Contex
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -1297,10 +1301,6 @@ func (ec *executionContext) fieldContext_BugSetTitlePayload_bug(_ context.Contex
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":
@@ -1458,6 +1458,10 @@ func (ec *executionContext) fieldContext_BugStatusClosePayload_bug(_ context.Con
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -1466,10 +1470,6 @@ func (ec *executionContext) fieldContext_BugStatusClosePayload_bug(_ context.Con
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":
@@ -1625,6 +1625,10 @@ func (ec *executionContext) fieldContext_BugStatusOpenPayload_bug(_ context.Cont
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -1633,10 +1637,6 @@ func (ec *executionContext) fieldContext_BugStatusOpenPayload_bug(_ context.Cont
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":
@@ -12,6 +12,7 @@ import (
"github.com/99designs/gqlgen/graphql"
"github.com/git-bug/git-bug/api/graphql/models"
+ "github.com/git-bug/git-bug/entities/board"
"github.com/git-bug/git-bug/entities/bug"
"github.com/git-bug/git-bug/entity/dag"
"github.com/vektah/gqlparser/v2/ast"
@@ -353,6 +354,31 @@ func (ec *executionContext) _Operation(ctx context.Context, sel ast.SelectionSet
return graphql.Null
}
return ec._BugAddCommentOperation(ctx, sel, obj)
+ case *board.SetTitleOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardSetTitleOperation(ctx, sel, obj)
+ case *board.SetDescriptionOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardSetDescriptionOperation(ctx, sel, obj)
+ case *board.CreateOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardCreateOperation(ctx, sel, obj)
+ case *board.AddItemEntityOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardAddItemEntityOperation(ctx, sel, obj)
+ case *board.AddItemDraftOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardAddItemDraftOperation(ctx, sel, obj)
default:
panic(fmt.Errorf("unexpected type %T", obj))
}
@@ -2555,6 +2555,36 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S
return res
}
+func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) {
+ var vSlice []any
+ vSlice = graphql.CoerceList(v)
+ var err error
+ res := make([]string, len(vSlice))
+ for i := range vSlice {
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
+ res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
+ if err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+}
+
+func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
+ ret := make(graphql.Array, len(v))
+ for i := range v {
+ ret[i] = ec.marshalNString2string(ctx, sel, v[i])
+ }
+
+ for _, e := range ret {
+ if e == graphql.Null {
+ return graphql.Null
+ }
+ }
+
+ return ret
+}
+
func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
return ec.___Directive(ctx, sel, &v)
}
@@ -554,6 +554,10 @@ func (ec *executionContext) fieldContext_Repository_bug(ctx context.Context, fie
return ec.fieldContext_Bug_id(ctx, field)
case "humanId":
return ec.fieldContext_Bug_humanId(ctx, field)
+ case "createdAt":
+ return ec.fieldContext_Bug_createdAt(ctx, field)
+ case "lastEdit":
+ return ec.fieldContext_Bug_lastEdit(ctx, field)
case "status":
return ec.fieldContext_Bug_status(ctx, field)
case "title":
@@ -562,10 +566,6 @@ func (ec *executionContext) fieldContext_Repository_bug(ctx context.Context, fie
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":
@@ -33,6 +33,15 @@ type Config struct {
}
type ResolverRoot interface {
+ Board() BoardResolver
+ BoardAddItemDraftOperation() BoardAddItemDraftOperationResolver
+ BoardAddItemEntityOperation() BoardAddItemEntityOperationResolver
+ BoardColumn() BoardColumnResolver
+ BoardCreateOperation() BoardCreateOperationResolver
+ BoardItemBug() BoardItemBugResolver
+ BoardItemDraft() BoardItemDraftResolver
+ BoardSetDescriptionOperation() BoardSetDescriptionOperationResolver
+ BoardSetTitleOperation() BoardSetTitleOperationResolver
Bug() BugResolver
BugAddCommentOperation() BugAddCommentOperationResolver
BugAddCommentTimelineItem() BugAddCommentTimelineItemResolver
@@ -59,6 +68,116 @@ type DirectiveRoot struct {
}
type ComplexityRoot struct {
+ Board struct {
+ Actors func(childComplexity int, after *string, before *string, first *int, last *int) int
+ Columns func(childComplexity int, after *string, before *string, first *int, last *int) int
+ CreatedAt func(childComplexity int) int
+ Description func(childComplexity int) int
+ HumanID func(childComplexity int) int
+ Id func(childComplexity int) int
+ LastEdit func(childComplexity int) int
+ Operations func(childComplexity int, after *string, before *string, first *int, last *int) int
+ Title func(childComplexity int) int
+ }
+
+ BoardAddItemDraftOperation struct {
+ Author func(childComplexity int) int
+ ColumnId func(childComplexity int) int
+ Id func(childComplexity int) int
+ Time func(childComplexity int) int
+ Title func(childComplexity int) int
+ }
+
+ BoardAddItemEntityOperation struct {
+ Author func(childComplexity int) int
+ ColumnId func(childComplexity int) int
+ EntityId func(childComplexity int) int
+ EntityType func(childComplexity int) int
+ Id func(childComplexity int) int
+ Time func(childComplexity int) int
+ }
+
+ BoardColumn struct {
+ CombinedId func(childComplexity int) int
+ Items func(childComplexity int, after *string, before *string, first *int, last *int) int
+ Name func(childComplexity int) int
+ }
+
+ BoardColumnConnection struct {
+ Edges func(childComplexity int) int
+ Nodes func(childComplexity int) int
+ PageInfo func(childComplexity int) int
+ TotalCount func(childComplexity int) int
+ }
+
+ BoardColumnEdge struct {
+ Cursor func(childComplexity int) int
+ Node func(childComplexity int) int
+ }
+
+ BoardConnection struct {
+ Edges func(childComplexity int) int
+ Nodes func(childComplexity int) int
+ PageInfo func(childComplexity int) int
+ TotalCount func(childComplexity int) int
+ }
+
+ BoardCreateOperation struct {
+ Author func(childComplexity int) int
+ Columns func(childComplexity int) int
+ Description func(childComplexity int) int
+ Id func(childComplexity int) int
+ Time func(childComplexity int) int
+ Title func(childComplexity int) int
+ }
+
+ BoardEdge struct {
+ Cursor func(childComplexity int) int
+ Node func(childComplexity int) int
+ }
+
+ BoardItemBug struct {
+ Author func(childComplexity int) int
+ CombinedId func(childComplexity int) int
+ Labels func(childComplexity int) int
+ Title func(childComplexity int) int
+ }
+
+ BoardItemConnection struct {
+ Edges func(childComplexity int) int
+ Nodes func(childComplexity int) int
+ PageInfo func(childComplexity int) int
+ TotalCount func(childComplexity int) int
+ }
+
+ BoardItemDraft struct {
+ Author func(childComplexity int) int
+ CombinedId func(childComplexity int) int
+ Labels func(childComplexity int) int
+ Title func(childComplexity int) int
+ }
+
+ BoardItemEdge struct {
+ Cursor func(childComplexity int) int
+ Node func(childComplexity int) int
+ }
+
+ BoardSetDescriptionOperation struct {
+ Author func(childComplexity int) int
+ Description func(childComplexity int) int
+ Id func(childComplexity int) int
+ Time func(childComplexity int) int
+ Was func(childComplexity int) int
+ }
+
+ BoardSetTitleOperation struct {
+ Author func(childComplexity int) int
+ Id func(childComplexity int) int
+ Time func(childComplexity int) int
+ Title func(childComplexity int) int
+ Was func(childComplexity int) int
+ }
+
Bug struct {
Actors func(childComplexity int, after *string, before *string, first *int, last *int) int
Author func(childComplexity int) int
@@ -339,58 +458,533 @@ type ComplexityRoot struct {
BugStatusOpen func(childComplexity int, input models.BugStatusOpenInput) int
}
- OperationConnection struct {
- Edges func(childComplexity int) int
- Nodes func(childComplexity int) int
- PageInfo func(childComplexity int) int
- TotalCount func(childComplexity int) int
- }
+ OperationConnection struct {
+ Edges func(childComplexity int) int
+ Nodes func(childComplexity int) int
+ PageInfo func(childComplexity int) int
+ TotalCount func(childComplexity int) int
+ }
+
+ OperationEdge struct {
+ Cursor func(childComplexity int) int
+ Node func(childComplexity int) int
+ }
+
+ PageInfo struct {
+ EndCursor func(childComplexity int) int
+ HasNextPage func(childComplexity int) int
+ HasPreviousPage func(childComplexity int) int
+ StartCursor func(childComplexity int) int
+ }
+
+ Query struct {
+ Repository func(childComplexity int, ref *string) int
+ }
+
+ Repository struct {
+ AllBugs func(childComplexity int, after *string, before *string, first *int, last *int, query *string) int
+ AllIdentities func(childComplexity int, after *string, before *string, first *int, last *int) int
+ Bug func(childComplexity int, prefix string) int
+ Identity func(childComplexity int, prefix string) int
+ Name func(childComplexity int) int
+ UserIdentity func(childComplexity int) int
+ ValidLabels func(childComplexity int, after *string, before *string, first *int, last *int) int
+ }
+}
+
+type executableSchema struct {
+ schema *ast.Schema
+ resolvers ResolverRoot
+ directives DirectiveRoot
+ complexity ComplexityRoot
+}
+
+func (e *executableSchema) Schema() *ast.Schema {
+ if e.schema != nil {
+ return e.schema
+ }
+ return parsedSchema
+}
+
+func (e *executableSchema) Complexity(ctx context.Context, typeName, field string, childComplexity int, rawArgs map[string]any) (int, bool) {
+ ec := executionContext{nil, e, 0, 0, nil}
+ _ = ec
+ switch typeName + "." + field {
+
+ case "Board.actors":
+ if e.complexity.Board.Actors == nil {
+ break
+ }
+
+ args, err := ec.field_Board_actors_args(ctx, rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Board.Actors(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true
+
+ case "Board.columns":
+ if e.complexity.Board.Columns == nil {
+ break
+ }
+
+ args, err := ec.field_Board_columns_args(ctx, rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Board.Columns(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true
+
+ case "Board.createdAt":
+ if e.complexity.Board.CreatedAt == nil {
+ break
+ }
+
+ return e.complexity.Board.CreatedAt(childComplexity), true
+
+ case "Board.description":
+ if e.complexity.Board.Description == nil {
+ break
+ }
+
+ return e.complexity.Board.Description(childComplexity), true
+
+ case "Board.humanId":
+ if e.complexity.Board.HumanID == nil {
+ break
+ }
+
+ return e.complexity.Board.HumanID(childComplexity), true
+
+ case "Board.id":
+ if e.complexity.Board.Id == nil {
+ break
+ }
+
+ return e.complexity.Board.Id(childComplexity), true
+
+ case "Board.lastEdit":
+ if e.complexity.Board.LastEdit == nil {
+ break
+ }
+
+ return e.complexity.Board.LastEdit(childComplexity), true
+
+ case "Board.operations":
+ if e.complexity.Board.Operations == nil {
+ break
+ }
+
+ args, err := ec.field_Board_operations_args(ctx, rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.Board.Operations(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true
+
+ case "Board.title":
+ if e.complexity.Board.Title == nil {
+ break
+ }
+
+ return e.complexity.Board.Title(childComplexity), true
+
+ case "BoardAddItemDraftOperation.author":
+ if e.complexity.BoardAddItemDraftOperation.Author == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemDraftOperation.Author(childComplexity), true
+
+ case "BoardAddItemDraftOperation.columnId":
+ if e.complexity.BoardAddItemDraftOperation.ColumnId == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemDraftOperation.ColumnId(childComplexity), true
+
+ case "BoardAddItemDraftOperation.id":
+ if e.complexity.BoardAddItemDraftOperation.Id == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemDraftOperation.Id(childComplexity), true
+
+ case "BoardAddItemDraftOperation.date":
+ if e.complexity.BoardAddItemDraftOperation.Time == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemDraftOperation.Time(childComplexity), true
+
+ case "BoardAddItemDraftOperation.title":
+ if e.complexity.BoardAddItemDraftOperation.Title == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemDraftOperation.Title(childComplexity), true
+
+ case "BoardAddItemEntityOperation.author":
+ if e.complexity.BoardAddItemEntityOperation.Author == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemEntityOperation.Author(childComplexity), true
+
+ case "BoardAddItemEntityOperation.columnId":
+ if e.complexity.BoardAddItemEntityOperation.ColumnId == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemEntityOperation.ColumnId(childComplexity), true
+
+ case "BoardAddItemEntityOperation.entityId":
+ if e.complexity.BoardAddItemEntityOperation.EntityId == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemEntityOperation.EntityId(childComplexity), true
+
+ case "BoardAddItemEntityOperation.entityType":
+ if e.complexity.BoardAddItemEntityOperation.EntityType == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemEntityOperation.EntityType(childComplexity), true
+
+ case "BoardAddItemEntityOperation.id":
+ if e.complexity.BoardAddItemEntityOperation.Id == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemEntityOperation.Id(childComplexity), true
+
+ case "BoardAddItemEntityOperation.date":
+ if e.complexity.BoardAddItemEntityOperation.Time == nil {
+ break
+ }
+
+ return e.complexity.BoardAddItemEntityOperation.Time(childComplexity), true
+
+ case "BoardColumn.id":
+ if e.complexity.BoardColumn.CombinedId == nil {
+ break
+ }
+
+ return e.complexity.BoardColumn.CombinedId(childComplexity), true
+
+ case "BoardColumn.items":
+ if e.complexity.BoardColumn.Items == nil {
+ break
+ }
+
+ args, err := ec.field_BoardColumn_items_args(ctx, rawArgs)
+ if err != nil {
+ return 0, false
+ }
+
+ return e.complexity.BoardColumn.Items(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true
+
+ case "BoardColumn.name":
+ if e.complexity.BoardColumn.Name == nil {
+ break
+ }
+
+ return e.complexity.BoardColumn.Name(childComplexity), true
+
+ case "BoardColumnConnection.edges":
+ if e.complexity.BoardColumnConnection.Edges == nil {
+ break
+ }
+
+ return e.complexity.BoardColumnConnection.Edges(childComplexity), true
+
+ case "BoardColumnConnection.nodes":
+ if e.complexity.BoardColumnConnection.Nodes == nil {
+ break
+ }
+
+ return e.complexity.BoardColumnConnection.Nodes(childComplexity), true
+
+ case "BoardColumnConnection.pageInfo":
+ if e.complexity.BoardColumnConnection.PageInfo == nil {
+ break
+ }
+
+ return e.complexity.BoardColumnConnection.PageInfo(childComplexity), true
+
+ case "BoardColumnConnection.totalCount":
+ if e.complexity.BoardColumnConnection.TotalCount == nil {
+ break
+ }
+
+ return e.complexity.BoardColumnConnection.TotalCount(childComplexity), true
+
+ case "BoardColumnEdge.cursor":
+ if e.complexity.BoardColumnEdge.Cursor == nil {
+ break
+ }
+
+ return e.complexity.BoardColumnEdge.Cursor(childComplexity), true
+
+ case "BoardColumnEdge.node":
+ if e.complexity.BoardColumnEdge.Node == nil {
+ break
+ }
+
+ return e.complexity.BoardColumnEdge.Node(childComplexity), true
+
+ case "BoardConnection.edges":
+ if e.complexity.BoardConnection.Edges == nil {
+ break
+ }
+
+ return e.complexity.BoardConnection.Edges(childComplexity), true
+
+ case "BoardConnection.nodes":
+ if e.complexity.BoardConnection.Nodes == nil {
+ break
+ }
+
+ return e.complexity.BoardConnection.Nodes(childComplexity), true
+
+ case "BoardConnection.pageInfo":
+ if e.complexity.BoardConnection.PageInfo == nil {
+ break
+ }
+
+ return e.complexity.BoardConnection.PageInfo(childComplexity), true
+
+ case "BoardConnection.totalCount":
+ if e.complexity.BoardConnection.TotalCount == nil {
+ break
+ }
+
+ return e.complexity.BoardConnection.TotalCount(childComplexity), true
+
+ case "BoardCreateOperation.author":
+ if e.complexity.BoardCreateOperation.Author == nil {
+ break
+ }
+
+ return e.complexity.BoardCreateOperation.Author(childComplexity), true
+
+ case "BoardCreateOperation.columns":
+ if e.complexity.BoardCreateOperation.Columns == nil {
+ break
+ }
+
+ return e.complexity.BoardCreateOperation.Columns(childComplexity), true
+
+ case "BoardCreateOperation.description":
+ if e.complexity.BoardCreateOperation.Description == nil {
+ break
+ }
+
+ return e.complexity.BoardCreateOperation.Description(childComplexity), true
+
+ case "BoardCreateOperation.id":
+ if e.complexity.BoardCreateOperation.Id == nil {
+ break
+ }
+
+ return e.complexity.BoardCreateOperation.Id(childComplexity), true
+
+ case "BoardCreateOperation.date":
+ if e.complexity.BoardCreateOperation.Time == nil {
+ break
+ }
+
+ return e.complexity.BoardCreateOperation.Time(childComplexity), true
+
+ case "BoardCreateOperation.title":
+ if e.complexity.BoardCreateOperation.Title == nil {
+ break
+ }
+
+ return e.complexity.BoardCreateOperation.Title(childComplexity), true
+
+ case "BoardEdge.cursor":
+ if e.complexity.BoardEdge.Cursor == nil {
+ break
+ }
+
+ return e.complexity.BoardEdge.Cursor(childComplexity), true
+
+ case "BoardEdge.node":
+ if e.complexity.BoardEdge.Node == nil {
+ break
+ }
+
+ return e.complexity.BoardEdge.Node(childComplexity), true
+
+ case "BoardItemBug.author":
+ if e.complexity.BoardItemBug.Author == nil {
+ break
+ }
+
+ return e.complexity.BoardItemBug.Author(childComplexity), true
+
+ case "BoardItemBug.id":
+ if e.complexity.BoardItemBug.CombinedId == nil {
+ break
+ }
+
+ return e.complexity.BoardItemBug.CombinedId(childComplexity), true
+
+ case "BoardItemBug.labels":
+ if e.complexity.BoardItemBug.Labels == nil {
+ break
+ }
+
+ return e.complexity.BoardItemBug.Labels(childComplexity), true
+
+ case "BoardItemBug.title":
+ if e.complexity.BoardItemBug.Title == nil {
+ break
+ }
+
+ return e.complexity.BoardItemBug.Title(childComplexity), true
+
+ case "BoardItemConnection.edges":
+ if e.complexity.BoardItemConnection.Edges == nil {
+ break
+ }
+
+ return e.complexity.BoardItemConnection.Edges(childComplexity), true
+
+ case "BoardItemConnection.nodes":
+ if e.complexity.BoardItemConnection.Nodes == nil {
+ break
+ }
+
+ return e.complexity.BoardItemConnection.Nodes(childComplexity), true
+
+ case "BoardItemConnection.pageInfo":
+ if e.complexity.BoardItemConnection.PageInfo == nil {
+ break
+ }
+
+ return e.complexity.BoardItemConnection.PageInfo(childComplexity), true
+
+ case "BoardItemConnection.totalCount":
+ if e.complexity.BoardItemConnection.TotalCount == nil {
+ break
+ }
+
+ return e.complexity.BoardItemConnection.TotalCount(childComplexity), true
+
+ case "BoardItemDraft.author":
+ if e.complexity.BoardItemDraft.Author == nil {
+ break
+ }
+
+ return e.complexity.BoardItemDraft.Author(childComplexity), true
+
+ case "BoardItemDraft.id":
+ if e.complexity.BoardItemDraft.CombinedId == nil {
+ break
+ }
+
+ return e.complexity.BoardItemDraft.CombinedId(childComplexity), true
+
+ case "BoardItemDraft.labels":
+ if e.complexity.BoardItemDraft.Labels == nil {
+ break
+ }
+
+ return e.complexity.BoardItemDraft.Labels(childComplexity), true
+
+ case "BoardItemDraft.title":
+ if e.complexity.BoardItemDraft.Title == nil {
+ break
+ }
+
+ return e.complexity.BoardItemDraft.Title(childComplexity), true
+
+ case "BoardItemEdge.cursor":
+ if e.complexity.BoardItemEdge.Cursor == nil {
+ break
+ }
+
+ return e.complexity.BoardItemEdge.Cursor(childComplexity), true
+
+ case "BoardItemEdge.node":
+ if e.complexity.BoardItemEdge.Node == nil {
+ break
+ }
+
+ return e.complexity.BoardItemEdge.Node(childComplexity), true
+
+ case "BoardSetDescriptionOperation.author":
+ if e.complexity.BoardSetDescriptionOperation.Author == nil {
+ break
+ }
+
+ return e.complexity.BoardSetDescriptionOperation.Author(childComplexity), true
+
+ case "BoardSetDescriptionOperation.description":
+ if e.complexity.BoardSetDescriptionOperation.Description == nil {
+ break
+ }
+
+ return e.complexity.BoardSetDescriptionOperation.Description(childComplexity), true
+
+ case "BoardSetDescriptionOperation.id":
+ if e.complexity.BoardSetDescriptionOperation.Id == nil {
+ break
+ }
+
+ return e.complexity.BoardSetDescriptionOperation.Id(childComplexity), true
+
+ case "BoardSetDescriptionOperation.date":
+ if e.complexity.BoardSetDescriptionOperation.Time == nil {
+ break
+ }
+
+ return e.complexity.BoardSetDescriptionOperation.Time(childComplexity), true
+
+ case "BoardSetDescriptionOperation.was":
+ if e.complexity.BoardSetDescriptionOperation.Was == nil {
+ break
+ }
+
+ return e.complexity.BoardSetDescriptionOperation.Was(childComplexity), true
+
+ case "BoardSetTitleOperation.author":
+ if e.complexity.BoardSetTitleOperation.Author == nil {
+ break
+ }
+
+ return e.complexity.BoardSetTitleOperation.Author(childComplexity), true
- OperationEdge struct {
- Cursor func(childComplexity int) int
- Node func(childComplexity int) int
- }
+ case "BoardSetTitleOperation.id":
+ if e.complexity.BoardSetTitleOperation.Id == nil {
+ break
+ }
- PageInfo struct {
- EndCursor func(childComplexity int) int
- HasNextPage func(childComplexity int) int
- HasPreviousPage func(childComplexity int) int
- StartCursor func(childComplexity int) int
- }
+ return e.complexity.BoardSetTitleOperation.Id(childComplexity), true
- Query struct {
- Repository func(childComplexity int, ref *string) int
- }
+ case "BoardSetTitleOperation.date":
+ if e.complexity.BoardSetTitleOperation.Time == nil {
+ break
+ }
- Repository struct {
- AllBugs func(childComplexity int, after *string, before *string, first *int, last *int, query *string) int
- AllIdentities func(childComplexity int, after *string, before *string, first *int, last *int) int
- Bug func(childComplexity int, prefix string) int
- Identity func(childComplexity int, prefix string) int
- Name func(childComplexity int) int
- UserIdentity func(childComplexity int) int
- ValidLabels func(childComplexity int, after *string, before *string, first *int, last *int) int
- }
-}
+ return e.complexity.BoardSetTitleOperation.Time(childComplexity), true
-type executableSchema struct {
- schema *ast.Schema
- resolvers ResolverRoot
- directives DirectiveRoot
- complexity ComplexityRoot
-}
+ case "BoardSetTitleOperation.title":
+ if e.complexity.BoardSetTitleOperation.Title == nil {
+ break
+ }
-func (e *executableSchema) Schema() *ast.Schema {
- if e.schema != nil {
- return e.schema
- }
- return parsedSchema
-}
+ return e.complexity.BoardSetTitleOperation.Title(childComplexity), true
-func (e *executableSchema) Complexity(ctx context.Context, typeName, field string, childComplexity int, rawArgs map[string]any) (int, bool) {
- ec := executionContext{nil, e, 0, 0, nil}
- _ = ec
- switch typeName + "." + field {
+ case "BoardSetTitleOperation.was":
+ if e.complexity.BoardSetTitleOperation.Was == nil {
+ break
+ }
+
+ return e.complexity.BoardSetTitleOperation.Was(childComplexity), true
case "Bug.actors":
if e.complexity.Bug.Actors == nil {
@@ -1894,94 +2488,320 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er
}
var sources = []*ast.Source{
- {Name: "../schema/bug.graphql", Input: `type Bug implements Authored {
- """The identifier for this bug"""
- id: ID!
- """The human version (truncated) identifier for this bug"""
- humanId: String!
- status: Status!
- title: String!
- labels: [Label!]!
- author: Identity!
- createdAt: Time!
- lastEdit: Time!
-
- """The actors of the bug. Actors are Identity that have interacted with the bug."""
- actors(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): IdentityConnection!
-
- """The participants of the bug. Participants are Identity that have created or
- added a comment on the bug."""
- participants(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): IdentityConnection!
-
- comments(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): BugCommentConnection!
-
- timeline(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): BugTimelineItemConnection!
-
- operations(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): OperationConnection!
+ {Name: "../schema/board.graphql", Input: `type Board
+@goModel(model: "github.com/git-bug/git-bug/api/graphql/models.BoardWrapper") {
+
+ """The identifier for this board"""
+ id: ID!
+ """The human version (truncated) identifier for this board"""
+ humanId: String!
+
+ createdAt: Time!
+ lastEdit: Time!
+
+ title: String!
+ description: String!
+
+ columns(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): BoardColumnConnection!
+
+ """The actors of the board. Actors are Identity that have interacted with the board."""
+ actors(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): IdentityConnection!
+
+ operations(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): OperationConnection!
+}
+
+"""The connection type for Board."""
+type BoardConnection {
+ """A list of edges."""
+ edges: [BoardEdge!]!
+ nodes: [Board!]!
+ """Information to aid in pagination."""
+ pageInfo: PageInfo!
+ """Identifies the total count of items in the connection."""
+ totalCount: Int!
+}
+
+"""An edge in a connection."""
+type BoardEdge {
+ """A cursor for use in pagination."""
+ cursor: String!
+ """The item at the end of the edge."""
+ node: Board!
+}
+`, BuiltIn: false},
+ {Name: "../schema/board_columns.graphql", Input: `"""Represents a column on a Board."""
+type BoardColumn
+@goModel(model: "github.com/git-bug/git-bug/entities/board.Column") {
+ id: CombinedId! @goField(name: "CombinedId")
+
+ name: String!
+
+ items(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): BoardItemConnection!
+}
+
+type BoardColumnConnection {
+ edges: [BoardColumnEdge!]!
+ nodes: [BoardColumn!]!
+ pageInfo: PageInfo!
+ totalCount: Int!
+}
+
+type BoardColumnEdge {
+ cursor: String!
+ node: BoardColumn!
+}
+`, BuiltIn: false},
+ {Name: "../schema/board_item.graphql", Input: `"""Represents an Item on a Board's Column."""
+interface BoardItem
+@goModel(model: "github.com/git-bug/git-bug/entities/board.Item") {
+ """The identifier of the item"""
+ id: CombinedId! @goField(name: "CombinedId")
+ """The item's author."""
+ author: Identity!
+ """The item's title."""
+ title: String!
+ """The item's labels."""
+ labels: [Label!]!
+}
+
+type BoardItemConnection {
+ edges: [BoardItemEdge!]!
+ nodes: [BoardItem!]!
+ pageInfo: PageInfo!
+ totalCount: Int!
+}
+
+type BoardItemEdge {
+ cursor: String!
+ node: BoardItem!
+}
+
+type BoardItemDraft implements BoardItem & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.Draft") {
+ """The identifier of the item"""
+ id: CombinedId! @goField(name: "CombinedId")
+ """The item's author."""
+ author: Identity!
+ """The item's title."""
+ title: String!
+ """The item's labels."""
+ labels: [Label!]!
+}
+
+type BoardItemBug implements BoardItem & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.BugItem") {
+ """The identifier of the item"""
+ id: CombinedId! @goField(name: "CombinedId")
+ """The item's author."""
+ author: Identity!
+ """The item's title."""
+ title: String!
+ """The item's labels."""
+ labels: [Label!]!
+}
+`, BuiltIn: false},
+ {Name: "../schema/board_operations.graphql", Input: `type BoardCreateOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.CreateOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ title: String!
+ description: String!
+ columns: [String!]!
+}
+
+type BoardAddItemDraftOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.AddItemDraftOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ columnId: ID!
+ title: String!
+}
+
+type BoardAddItemEntityOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.AddItemEntityOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ columnId: ID!
+ entityType: BoardItemEntityType!
+ entityId: ID!
+}
+
+enum BoardItemEntityType {
+ BUG
+}
+
+type BoardSetDescriptionOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.SetDescriptionOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ description: String!
+ was: String!
+}
+
+type BoardSetTitleOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.SetTitleOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ title: String!
+ was: String!
+}
+`, BuiltIn: false},
+ {Name: "../schema/bug.graphql", Input: `type Bug implements Authored
+@goModel(model: "github.com/git-bug/git-bug/api/graphql/models.BugWrapper") {
+
+ """The identifier for this bug"""
+ id: ID!
+ """The human version (truncated) identifier for this bug"""
+ humanId: String!
+
+ createdAt: Time!
+ lastEdit: Time!
+
+ status: Status!
+ title: String!
+ labels: [Label!]!
+ author: Identity!
+
+ """The actors of the bug. Actors are Identity that have interacted with the bug."""
+ actors(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): IdentityConnection!
+
+ """The participants of the bug. Participants are Identity that have created or
+ added a comment on the bug."""
+ participants(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): IdentityConnection!
+
+ """The comments of the bug. They include the bug's creation comment."""
+ comments(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): BugCommentConnection!
+
+ """The timeline of changes on the bug."""
+ timeline(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): BugTimelineItemConnection!
+
+ """The raw operations on the bug."""
+ operations(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): OperationConnection!
}
"""The connection type for Bug."""
type BugConnection {
- """A list of edges."""
- edges: [BugEdge!]!
- nodes: [Bug!]!
- """Information to aid in pagination."""
- pageInfo: PageInfo!
- """Identifies the total count of items in the connection."""
- totalCount: Int!
+ """A list of edges."""
+ edges: [BugEdge!]!
+ nodes: [Bug!]!
+ """Information to aid in pagination."""
+ pageInfo: PageInfo!
+ """Identifies the total count of items in the connection."""
+ totalCount: Int!
}
"""An edge in a connection."""
type BugEdge {
- """A cursor for use in pagination."""
- cursor: String!
- """The item at the end of the edge."""
- node: Bug!
+ """A cursor for use in pagination."""
+ cursor: String!
+ """The item at the end of the edge."""
+ node: Bug!
}
`, BuiltIn: false},
{Name: "../schema/bug_comment.graphql", Input: `"""Represents a comment on a bug."""
@@ -13,6 +13,7 @@ import (
"github.com/99designs/gqlgen/graphql"
"github.com/git-bug/git-bug/api/graphql/models"
+ "github.com/git-bug/git-bug/entities/board"
"github.com/git-bug/git-bug/entities/bug"
"github.com/git-bug/git-bug/entity"
"github.com/git-bug/git-bug/repository"
@@ -414,6 +415,41 @@ func (ec *executionContext) _Authored(ctx context.Context, sel ast.SelectionSet,
return graphql.Null
}
return ec._BugAddCommentOperation(ctx, sel, obj)
+ case *board.SetTitleOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardSetTitleOperation(ctx, sel, obj)
+ case *board.SetDescriptionOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardSetDescriptionOperation(ctx, sel, obj)
+ case *board.Draft:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardItemDraft(ctx, sel, obj)
+ case *board.BugItem:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardItemBug(ctx, sel, obj)
+ case *board.CreateOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardCreateOperation(ctx, sel, obj)
+ case *board.AddItemEntityOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardAddItemEntityOperation(ctx, sel, obj)
+ case *board.AddItemDraftOperation:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._BoardAddItemDraftOperation(ctx, sel, obj)
case bug.Comment:
return ec._BugComment(ctx, sel, &obj)
case *bug.Comment:
@@ -5,6 +5,16 @@ func (e OperationEdge) GetCursor() string {
return e.Cursor
}
+// GetCursor return the cursor entry of an edge
+func (e BoardColumnEdge) GetCursor() string {
+ return e.Cursor
+}
+
+// GetCursor return the cursor entry of an edge
+func (e BoardItemEdge) GetCursor() string {
+ return e.Cursor
+}
+
// GetCursor return the cursor entry of an edge
func (e BugEdge) GetCursor() string {
return e.Cursor
@@ -3,6 +3,12 @@
package models
import (
+ "bytes"
+ "fmt"
+ "io"
+ "strconv"
+
+ "github.com/git-bug/git-bug/entities/board"
"github.com/git-bug/git-bug/entities/bug"
"github.com/git-bug/git-bug/entities/common"
"github.com/git-bug/git-bug/entity/dag"
@@ -14,6 +20,49 @@ type Authored interface {
IsAuthored()
}
+type BoardColumnConnection struct {
+ Edges []*BoardColumnEdge `json:"edges"`
+ Nodes []*board.Column `json:"nodes"`
+ PageInfo *PageInfo `json:"pageInfo"`
+ TotalCount int `json:"totalCount"`
+}
+
+type BoardColumnEdge struct {
+ Cursor string `json:"cursor"`
+ Node *board.Column `json:"node"`
+}
+
+// The connection type for Board.
+type BoardConnection struct {
+ // A list of edges.
+ Edges []*BoardEdge `json:"edges"`
+ Nodes []BoardWrapper `json:"nodes"`
+ // Information to aid in pagination.
+ PageInfo *PageInfo `json:"pageInfo"`
+ // Identifies the total count of items in the connection.
+ TotalCount int `json:"totalCount"`
+}
+
+// An edge in a connection.
+type BoardEdge struct {
+ // A cursor for use in pagination.
+ Cursor string `json:"cursor"`
+ // The item at the end of the edge.
+ Node BoardWrapper `json:"node"`
+}
+
+type BoardItemConnection struct {
+ Edges []*BoardItemEdge `json:"edges"`
+ Nodes []board.Item `json:"nodes"`
+ PageInfo *PageInfo `json:"pageInfo"`
+ TotalCount int `json:"totalCount"`
+}
+
+type BoardItemEdge struct {
+ Cursor string `json:"cursor"`
+ Node board.Item `json:"node"`
+}
+
type BugAddCommentAndCloseInput struct {
// A unique identifier for the client performing the mutation.
ClientMutationID *string `json:"clientMutationId,omitempty"`
@@ -308,3 +357,56 @@ type PageInfo struct {
type Query struct {
}
+
+type BoardItemEntityType string
+
+const (
+ BoardItemEntityTypeBug BoardItemEntityType = "BUG"
+)
+
+var AllBoardItemEntityType = []BoardItemEntityType{
+ BoardItemEntityTypeBug,
+}
+
+func (e BoardItemEntityType) IsValid() bool {
+ switch e {
+ case BoardItemEntityTypeBug:
+ return true
+ }
+ return false
+}
+
+func (e BoardItemEntityType) String() string {
+ return string(e)
+}
+
+func (e *BoardItemEntityType) UnmarshalGQL(v any) error {
+ str, ok := v.(string)
+ if !ok {
+ return fmt.Errorf("enums must be strings")
+ }
+
+ *e = BoardItemEntityType(str)
+ if !e.IsValid() {
+ return fmt.Errorf("%s is not a valid BoardItemEntityType", str)
+ }
+ return nil
+}
+
+func (e BoardItemEntityType) MarshalGQL(w io.Writer) {
+ fmt.Fprint(w, strconv.Quote(e.String()))
+}
+
+func (e *BoardItemEntityType) UnmarshalJSON(b []byte) error {
+ s, err := strconv.Unquote(string(b))
+ if err != nil {
+ return err
+ }
+ return e.UnmarshalGQL(s)
+}
+
+func (e BoardItemEntityType) MarshalJSON() ([]byte, error) {
+ var buf bytes.Buffer
+ e.MarshalGQL(&buf)
+ return buf.Bytes(), nil
+}
@@ -0,0 +1,159 @@
+package models
+
+import (
+ "sync"
+ "time"
+
+ "github.com/git-bug/git-bug/cache"
+ "github.com/git-bug/git-bug/entities/board"
+ "github.com/git-bug/git-bug/entity"
+ "github.com/git-bug/git-bug/entity/dag"
+)
+
+// BoardWrapper is an interface used by the GraphQL resolvers to handle a board.
+// Depending on the situation, a Board can already be fully loaded in memory or not.
+// This interface is used to wrap either a lazyBoard or a loadedBoard depending on the situation.
+type BoardWrapper interface {
+ Id() entity.Id
+ LastEdit() time.Time
+ CreatedAt() time.Time
+
+ Title() string
+ Description() string
+ Columns() ([]*board.Column, error)
+
+ Actors() ([]IdentityWrapper, error)
+ Operations() ([]dag.Operation, error)
+}
+
+var _ BoardWrapper = &lazyBoard{}
+
+type lazyBoard struct {
+ cache *cache.RepoCache
+ excerpt *cache.BoardExcerpt
+
+ mu sync.Mutex
+ snap *board.Snapshot
+}
+
+func NewLazyBoard(cache *cache.RepoCache, excerpt *cache.BoardExcerpt) *lazyBoard {
+ return &lazyBoard{
+ cache: cache,
+ excerpt: excerpt,
+ }
+}
+
+func (lb *lazyBoard) load() error {
+ lb.mu.Lock()
+ defer lb.mu.Unlock()
+
+ if lb.snap != nil {
+ return nil
+ }
+
+ b, err := lb.cache.Boards().Resolve(lb.excerpt.Id())
+ if err != nil {
+ return err
+ }
+
+ lb.snap = b.Snapshot()
+ return nil
+}
+
+func (lb *lazyBoard) identity(id entity.Id) (IdentityWrapper, error) {
+ i, err := lb.cache.Identities().ResolveExcerpt(id)
+ if err != nil {
+ return nil, err
+ }
+ return &lazyIdentity{cache: lb.cache, excerpt: i}, nil
+}
+
+func (lb *lazyBoard) Id() entity.Id {
+ return lb.excerpt.Id()
+}
+
+func (lb *lazyBoard) LastEdit() time.Time {
+ return lb.excerpt.EditTime()
+}
+
+func (lb *lazyBoard) CreatedAt() time.Time {
+ return lb.excerpt.CreateTime()
+}
+
+func (lb *lazyBoard) Title() string {
+ return lb.excerpt.Title
+}
+
+func (lb *lazyBoard) Description() string {
+ return lb.excerpt.Description
+}
+
+func (lb *lazyBoard) Columns() ([]*board.Column, error) {
+ err := lb.load()
+ if err != nil {
+ return nil, err
+ }
+ return lb.snap.Columns, nil
+}
+
+func (lb *lazyBoard) Actors() ([]IdentityWrapper, error) {
+ result := make([]IdentityWrapper, len(lb.excerpt.Actors))
+ for i, actorId := range lb.excerpt.Actors {
+ actor, err := lb.identity(actorId)
+ if err != nil {
+ return nil, err
+ }
+ result[i] = actor
+ }
+ return result, nil
+}
+
+func (lb *lazyBoard) Operations() ([]dag.Operation, error) {
+ err := lb.load()
+ if err != nil {
+ return nil, err
+ }
+ return lb.snap.Operations, nil
+}
+
+var _ BoardWrapper = &loadedBoard{}
+
+type loadedBoard struct {
+ *board.Snapshot
+}
+
+func NewLoadedBoard(snap *board.Snapshot) *loadedBoard {
+ return &loadedBoard{Snapshot: snap}
+}
+
+func (l *loadedBoard) LastEdit() time.Time {
+ return l.Snapshot.EditTime()
+}
+
+func (l *loadedBoard) CreatedAt() time.Time {
+ return l.Snapshot.CreateTime
+}
+
+func (l *loadedBoard) Title() string {
+ return l.Snapshot.Title
+}
+
+func (l *loadedBoard) Description() string {
+ return l.Snapshot.Description
+}
+
+func (l *loadedBoard) Columns() ([]*board.Column, error) {
+ return l.Snapshot.Columns, nil
+}
+
+func (l *loadedBoard) Actors() ([]IdentityWrapper, error) {
+ res := make([]IdentityWrapper, len(l.Snapshot.Actors))
+ for i, actor := range l.Snapshot.Actors {
+ res[i] = NewLoadedIdentity(actor)
+ }
+ return res, nil
+}
+
+func (l *loadedBoard) Operations() ([]dag.Operation, error) {
+ return l.Snapshot.Operations, nil
+}
@@ -0,0 +1,167 @@
+package resolvers
+
+import (
+ "context"
+
+ "github.com/git-bug/git-bug/api/graphql/connections"
+ "github.com/git-bug/git-bug/api/graphql/graph"
+ "github.com/git-bug/git-bug/api/graphql/models"
+ "github.com/git-bug/git-bug/entities/board"
+ "github.com/git-bug/git-bug/entities/common"
+ "github.com/git-bug/git-bug/entity/dag"
+)
+
+var _ graph.BoardResolver = &boardResolver{}
+
+type boardResolver struct{}
+
+func (boardResolver) HumanID(ctx context.Context, obj models.BoardWrapper) (string, error) {
+ return obj.Id().Human(), nil
+}
+
+func (boardResolver) Columns(ctx context.Context, obj models.BoardWrapper, after *string, before *string, first *int, last *int) (*models.BoardColumnConnection, error) {
+ input := models.ConnectionInput{
+ Before: before,
+ After: after,
+ First: first,
+ Last: last,
+ }
+
+ edger := func(column *board.Column, offset int) connections.Edge {
+ return models.BoardColumnEdge{
+ Node: column,
+ Cursor: connections.OffsetToCursor(offset),
+ }
+ }
+
+ conMaker := func(edges []*models.BoardColumnEdge, nodes []*board.Column, info *models.PageInfo, totalCount int) (*models.BoardColumnConnection, error) {
+ return &models.BoardColumnConnection{
+ Edges: edges,
+ Nodes: nodes,
+ PageInfo: info,
+ TotalCount: totalCount,
+ }, nil
+ }
+
+ columns, err := obj.Columns()
+ if err != nil {
+ return nil, err
+ }
+
+ return connections.Connection(columns, edger, conMaker, input)
+}
+
+func (boardResolver) Actors(ctx context.Context, obj models.BoardWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error) {
+ input := models.ConnectionInput{
+ Before: before,
+ After: after,
+ First: first,
+ Last: last,
+ }
+
+ edger := func(actor models.IdentityWrapper, offset int) connections.Edge {
+ return models.IdentityEdge{
+ Node: actor,
+ Cursor: connections.OffsetToCursor(offset),
+ }
+ }
+
+ conMaker := func(edges []*models.IdentityEdge, nodes []models.IdentityWrapper, info *models.PageInfo, totalCount int) (*models.IdentityConnection, error) {
+ return &models.IdentityConnection{
+ Edges: edges,
+ Nodes: nodes,
+ PageInfo: info,
+ TotalCount: totalCount,
+ }, nil
+ }
+
+ actors, err := obj.Actors()
+ if err != nil {
+ return nil, err
+ }
+
+ return connections.Connection(actors, edger, conMaker, input)
+}
+
+func (boardResolver) Operations(ctx context.Context, obj models.BoardWrapper, after *string, before *string, first *int, last *int) (*models.OperationConnection, error) {
+ input := models.ConnectionInput{
+ Before: before,
+ After: after,
+ First: first,
+ Last: last,
+ }
+
+ edger := func(op dag.Operation, offset int) connections.Edge {
+ return models.OperationEdge{
+ Node: op,
+ Cursor: connections.OffsetToCursor(offset),
+ }
+ }
+
+ conMaker := func(edges []*models.OperationEdge, nodes []dag.Operation, info *models.PageInfo, totalCount int) (*models.OperationConnection, error) {
+ return &models.OperationConnection{
+ Edges: edges,
+ Nodes: nodes,
+ PageInfo: info,
+ TotalCount: totalCount,
+ }, nil
+ }
+
+ ops, err := obj.Operations()
+ if err != nil {
+ return nil, err
+ }
+
+ return connections.Connection(ops, edger, conMaker, input)
+}
+
+var _ graph.BoardColumnResolver = &boardColumnResolver{}
+
+type boardColumnResolver struct{}
+
+func (b boardColumnResolver) Items(ctx context.Context, obj *board.Column, after *string, before *string, first *int, last *int) (*models.BoardItemConnection, error) {
+ input := models.ConnectionInput{
+ Before: before,
+ After: after,
+ First: first,
+ Last: last,
+ }
+
+ edger := func(item board.Item, offset int) connections.Edge {
+ return models.BoardItemEdge{
+ Node: item,
+ Cursor: connections.OffsetToCursor(offset),
+ }
+ }
+
+ conMaker := func(edges []*models.BoardItemEdge, nodes []board.Item, info *models.PageInfo, totalCount int) (*models.BoardItemConnection, error) {
+ return &models.BoardItemConnection{
+ Edges: edges,
+ Nodes: nodes,
+ PageInfo: info,
+ TotalCount: totalCount,
+ }, nil
+ }
+
+ return connections.Connection(obj.Items, edger, conMaker, input)
+}
+
+var _ graph.BoardItemBugResolver = &boardItemBugResolver{}
+
+type boardItemBugResolver struct{}
+
+func (boardItemBugResolver) Author(ctx context.Context, obj *board.BugItem) (models.IdentityWrapper, error) {
+ return models.NewLoadedIdentity(obj.Author()), nil
+}
+
+var _ graph.BoardItemDraftResolver = &boardItemDraftResolver{}
+
+type boardItemDraftResolver struct{}
+
+func (boardItemDraftResolver) Author(ctx context.Context, obj *board.Draft) (models.IdentityWrapper, error) {
+ return models.NewLoadedIdentity(obj.Author()), nil
+}
+
+func (boardItemDraftResolver) Labels(ctx context.Context, obj *board.Draft) ([]common.Label, error) {
+ return nil, nil
+}
@@ -0,0 +1,59 @@
+package resolvers
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/git-bug/git-bug/api/graphql/graph"
+ "github.com/git-bug/git-bug/api/graphql/models"
+ "github.com/git-bug/git-bug/entities/board"
+)
+
+var _ graph.BoardAddItemDraftOperationResolver = boardAddItemDraftOperationResolver{}
+
+type boardAddItemDraftOperationResolver struct{}
+
+func (boardAddItemDraftOperationResolver) Author(ctx context.Context, obj *board.AddItemDraftOperation) (models.IdentityWrapper, error) {
+ return models.NewLoadedIdentity(obj.Author()), nil
+}
+
+var _ graph.BoardAddItemEntityOperationResolver = boardAddItemEntityOperationResolver{}
+
+type boardAddItemEntityOperationResolver struct{}
+
+func (boardAddItemEntityOperationResolver) Author(ctx context.Context, obj *board.AddItemEntityOperation) (models.IdentityWrapper, error) {
+ return models.NewLoadedIdentity(obj.Author()), nil
+}
+
+func (boardAddItemEntityOperationResolver) EntityType(ctx context.Context, obj *board.AddItemEntityOperation) (models.BoardItemEntityType, error) {
+ switch obj.EntityType {
+ case board.EntityTypeBug:
+ return models.BoardItemEntityTypeBug, nil
+ default:
+ return "", fmt.Errorf("unknown entity type: %s", obj.EntityType)
+ }
+}
+
+var _ graph.BoardCreateOperationResolver = boardCreateOperationResolver{}
+
+type boardCreateOperationResolver struct{}
+
+func (boardCreateOperationResolver) Author(ctx context.Context, obj *board.CreateOperation) (models.IdentityWrapper, error) {
+ return models.NewLoadedIdentity(obj.Author()), nil
+}
+
+var _ graph.BoardSetDescriptionOperationResolver = boardSetDescriptionOperationResolver{}
+
+type boardSetDescriptionOperationResolver struct{}
+
+func (boardSetDescriptionOperationResolver) Author(ctx context.Context, obj *board.SetDescriptionOperation) (models.IdentityWrapper, error) {
+ return models.NewLoadedIdentity(obj.Author()), nil
+}
+
+var _ graph.BoardSetTitleOperationResolver = boardSetTitleOperationResolver{}
+
+type boardSetTitleOperationResolver struct{}
+
+func (boardSetTitleOperationResolver) Author(ctx context.Context, obj *board.SetTitleOperation) (models.IdentityWrapper, error) {
+ return models.NewLoadedIdentity(obj.Author()), nil
+}
@@ -0,0 +1,37 @@
+package resolvers
+
+import "github.com/git-bug/git-bug/api/graphql/graph"
+
+type boardRootSubResolver struct{}
+
+func (boardRootSubResolver) BoardColumn() graph.BoardColumnResolver {
+ return &boardColumnResolver{}
+}
+
+func (boardRootSubResolver) BoardItemBug() graph.BoardItemBugResolver {
+ return &boardItemBugResolver{}
+}
+
+func (boardRootSubResolver) BoardItemDraft() graph.BoardItemDraftResolver {
+ return &boardItemDraftResolver{}
+}
+
+func (boardRootSubResolver) BoardAddItemDraftOperation() graph.BoardAddItemDraftOperationResolver {
+ return &boardAddItemDraftOperationResolver{}
+}
+
+func (boardRootSubResolver) BoardAddItemEntityOperation() graph.BoardAddItemEntityOperationResolver {
+ return &boardAddItemEntityOperationResolver{}
+}
+
+func (boardRootSubResolver) BoardCreateOperation() graph.BoardCreateOperationResolver {
+ return &boardCreateOperationResolver{}
+}
+
+func (boardRootSubResolver) BoardSetDescriptionOperation() graph.BoardSetDescriptionOperationResolver {
+ return &boardSetDescriptionOperationResolver{}
+}
+
+func (boardRootSubResolver) BoardSetTitleOperation() graph.BoardSetTitleOperationResolver {
+ return &boardSetTitleOperationResolver{}
+}
@@ -14,7 +14,7 @@ func (bugRootSubResolver) BugAddCommentTimelineItem() graph.BugAddCommentTimelin
return &bugAddCommentTimelineItemResolver{}
}
-func (r bugRootSubResolver) BugComment() graph.BugCommentResolver {
+func (bugRootSubResolver) BugComment() graph.BugCommentResolver {
return &commentResolver{}
}
@@ -30,7 +30,7 @@ func (bugRootSubResolver) BugCreateTimelineItem() graph.BugCreateTimelineItemRes
return &bugCreateTimelineItemResolver{}
}
-func (r bugRootSubResolver) BugEditCommentOperation() graph.BugEditCommentOperationResolver {
+func (bugRootSubResolver) BugEditCommentOperation() graph.BugEditCommentOperationResolver {
return &bugEditCommentOperationResolver{}
}
@@ -38,7 +38,7 @@ func (bugRootSubResolver) BugLabelChangeOperation() graph.BugLabelChangeOperatio
return &bugLabelChangeOperationResolver{}
}
-func (r bugRootSubResolver) BugLabelChangeTimelineItem() graph.BugLabelChangeTimelineItemResolver {
+func (bugRootSubResolver) BugLabelChangeTimelineItem() graph.BugLabelChangeTimelineItemResolver {
return &bugLabelChangeTimelineItem{}
}
@@ -46,14 +46,14 @@ func (bugRootSubResolver) BugSetStatusOperation() graph.BugSetStatusOperationRes
return &bugSetStatusOperationResolver{}
}
-func (r bugRootSubResolver) BugSetStatusTimelineItem() graph.BugSetStatusTimelineItemResolver {
+func (bugRootSubResolver) BugSetStatusTimelineItem() graph.BugSetStatusTimelineItemResolver {
return &bugSetStatusTimelineItem{}
}
-func (r bugRootSubResolver) BugSetTitleOperation() graph.BugSetTitleOperationResolver {
+func (bugRootSubResolver) BugSetTitleOperation() graph.BugSetTitleOperationResolver {
return &bugSetTitleOperationResolver{}
}
-func (r bugRootSubResolver) BugSetTitleTimelineItem() graph.BugSetTitleTimelineItemResolver {
+func (bugRootSubResolver) BugSetTitleTimelineItem() graph.BugSetTitleTimelineItemResolver {
return &bugSetTitleTimelineItem{}
}
@@ -10,6 +10,7 @@ var _ graph.ResolverRoot = &RootResolver{}
type RootResolver struct {
*cache.MultiRepoCache
+ boardRootSubResolver
bugRootSubResolver
}
@@ -47,6 +48,10 @@ func (RootResolver) Repository() graph.RepositoryResolver {
return &repoResolver{}
}
+func (r RootResolver) Board() graph.BoardResolver {
+ return &boardResolver{}
+}
+
func (RootResolver) Bug() graph.BugResolver {
return &bugResolver{}
}
@@ -0,0 +1,67 @@
+type Board
+@goModel(model: "github.com/git-bug/git-bug/api/graphql/models.BoardWrapper") {
+
+ """The identifier for this board"""
+ id: ID!
+ """The human version (truncated) identifier for this board"""
+ humanId: String!
+
+ createdAt: Time!
+ lastEdit: Time!
+
+ title: String!
+ description: String!
+
+ columns(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): BoardColumnConnection!
+
+ """The actors of the board. Actors are Identity that have interacted with the board."""
+ actors(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): IdentityConnection!
+
+ operations(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): OperationConnection!
+}
+
+"""The connection type for Board."""
+type BoardConnection {
+ """A list of edges."""
+ edges: [BoardEdge!]!
+ nodes: [Board!]!
+ """Information to aid in pagination."""
+ pageInfo: PageInfo!
+ """Identifies the total count of items in the connection."""
+ totalCount: Int!
+}
+
+"""An edge in a connection."""
+type BoardEdge {
+ """A cursor for use in pagination."""
+ cursor: String!
+ """The item at the end of the edge."""
+ node: Board!
+}
@@ -0,0 +1,30 @@
+"""Represents a column on a Board."""
+type BoardColumn
+@goModel(model: "github.com/git-bug/git-bug/entities/board.Column") {
+ id: CombinedId! @goField(name: "CombinedId")
+
+ name: String!
+
+ items(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): BoardItemConnection!
+}
+
+type BoardColumnConnection {
+ edges: [BoardColumnEdge!]!
+ nodes: [BoardColumn!]!
+ pageInfo: PageInfo!
+ totalCount: Int!
+}
+
+type BoardColumnEdge {
+ cursor: String!
+ node: BoardColumn!
+}
@@ -0,0 +1,48 @@
+"""Represents an Item on a Board's Column."""
+interface BoardItem
+@goModel(model: "github.com/git-bug/git-bug/entities/board.Item") {
+ """The identifier of the item"""
+ id: CombinedId! @goField(name: "CombinedId")
+ """The item's author."""
+ author: Identity!
+ """The item's title."""
+ title: String!
+ """The item's labels."""
+ labels: [Label!]!
+}
+
+type BoardItemConnection {
+ edges: [BoardItemEdge!]!
+ nodes: [BoardItem!]!
+ pageInfo: PageInfo!
+ totalCount: Int!
+}
+
+type BoardItemEdge {
+ cursor: String!
+ node: BoardItem!
+}
+
+type BoardItemDraft implements BoardItem & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.Draft") {
+ """The identifier of the item"""
+ id: CombinedId! @goField(name: "CombinedId")
+ """The item's author."""
+ author: Identity!
+ """The item's title."""
+ title: String!
+ """The item's labels."""
+ labels: [Label!]!
+}
+
+type BoardItemBug implements BoardItem & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.BugItem") {
+ """The identifier of the item"""
+ id: CombinedId! @goField(name: "CombinedId")
+ """The item's author."""
+ author: Identity!
+ """The item's title."""
+ title: String!
+ """The item's labels."""
+ labels: [Label!]!
+}
@@ -0,0 +1,70 @@
+type BoardCreateOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.CreateOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ title: String!
+ description: String!
+ columns: [String!]!
+}
+
+type BoardAddItemDraftOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.AddItemDraftOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ columnId: ID!
+ title: String!
+}
+
+type BoardAddItemEntityOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.AddItemEntityOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ columnId: ID!
+ entityType: BoardItemEntityType!
+ entityId: ID!
+}
+
+enum BoardItemEntityType {
+ BUG
+}
+
+type BoardSetDescriptionOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.SetDescriptionOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ description: String!
+ was: String!
+}
+
+type BoardSetTitleOperation implements Operation & Authored
+@goModel(model: "github.com/git-bug/git-bug/entities/board.SetTitleOperation") {
+ """The identifier of the operation"""
+ id: ID!
+ """The author of this object."""
+ author: Identity!
+ """The datetime when this operation was issued."""
+ date: Time! @goField(name: "Time")
+
+ title: String!
+ was: String!
+}
@@ -1,89 +1,96 @@
-type Bug implements Authored {
- """The identifier for this bug"""
- id: ID!
- """The human version (truncated) identifier for this bug"""
- humanId: String!
- status: Status!
- title: String!
- labels: [Label!]!
- author: Identity!
- createdAt: Time!
- lastEdit: Time!
+type Bug implements Authored
+@goModel(model: "github.com/git-bug/git-bug/api/graphql/models.BugWrapper") {
- """The actors of the bug. Actors are Identity that have interacted with the bug."""
- actors(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): IdentityConnection!
+ """The identifier for this bug"""
+ id: ID!
+ """The human version (truncated) identifier for this bug"""
+ humanId: String!
- """The participants of the bug. Participants are Identity that have created or
- added a comment on the bug."""
- participants(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): IdentityConnection!
+ createdAt: Time!
+ lastEdit: Time!
- comments(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): BugCommentConnection!
+ status: Status!
+ title: String!
+ labels: [Label!]!
+ author: Identity!
- timeline(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): BugTimelineItemConnection!
+ """The actors of the bug. Actors are Identity that have interacted with the bug."""
+ actors(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): IdentityConnection!
- operations(
- """Returns the elements in the list that come after the specified cursor."""
- after: String
- """Returns the elements in the list that come before the specified cursor."""
- before: String
- """Returns the first _n_ elements from the list."""
- first: Int
- """Returns the last _n_ elements from the list."""
- last: Int
- ): OperationConnection!
+ """The participants of the bug. Participants are Identity that have created or
+ added a comment on the bug."""
+ participants(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): IdentityConnection!
+
+ """The comments of the bug. They include the bug's creation comment."""
+ comments(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): BugCommentConnection!
+
+ """The timeline of changes on the bug."""
+ timeline(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): BugTimelineItemConnection!
+
+ """The raw operations on the bug."""
+ operations(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): OperationConnection!
}
"""The connection type for Bug."""
type BugConnection {
- """A list of edges."""
- edges: [BugEdge!]!
- nodes: [Bug!]!
- """Information to aid in pagination."""
- pageInfo: PageInfo!
- """Identifies the total count of items in the connection."""
- totalCount: Int!
+ """A list of edges."""
+ edges: [BugEdge!]!
+ nodes: [Bug!]!
+ """Information to aid in pagination."""
+ pageInfo: PageInfo!
+ """Identifies the total count of items in the connection."""
+ totalCount: Int!
}
"""An edge in a connection."""
type BugEdge {
- """A cursor for use in pagination."""
- cursor: String!
- """The item at the end of the edge."""
- node: Bug!
+ """A cursor for use in pagination."""
+ cursor: String!
+ """The item at the end of the edge."""
+ node: Bug!
}
@@ -1,5 +1,7 @@
"""Represents an identity"""
-type Identity {
+type Identity
+@goModel(model: "github.com/git-bug/git-bug/api/graphql/models.IdentityWrapper") {
+
"""The identifier for this identity"""
id: ID!
"""The human version (truncated) identifier for this identity"""
@@ -3,7 +3,8 @@ scalar Time
scalar Hash
"""Defines a color by red, green and blue components."""
-type Color {
+type Color
+@goModel(model: "image/color.RGBA") {
"""Red component of the color."""
R: Int!
"""Green component of the color."""
@@ -29,23 +29,23 @@ func NewBoardCache(b *board.Board, repo repository.ClockedRepo, getUserIdentity
}
}
-func (c *BoardCache) AddItemDraft(columnId entity.CombinedId, title, message string, files []repository.Hash) (entity.CombinedId, *board.AddItemDraftOperation, error) {
+func (c *BoardCache) AddItemDraft(columnId entity.CombinedId, title string) (entity.CombinedId, *board.AddItemDraftOperation, error) {
author, err := c.getUserIdentity()
if err != nil {
return entity.UnsetCombinedId, nil, err
}
- return c.AddItemDraftRaw(author, time.Now().Unix(), columnId, title, message, files, nil)
+ return c.AddItemDraftRaw(author, time.Now().Unix(), columnId, title, nil)
}
-func (c *BoardCache) AddItemDraftRaw(author identity.Interface, unixTime int64, columnId entity.CombinedId, title, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *board.AddItemDraftOperation, error) {
+func (c *BoardCache) AddItemDraftRaw(author identity.Interface, unixTime int64, columnId entity.CombinedId, title string, metadata map[string]string) (entity.CombinedId, *board.AddItemDraftOperation, error) {
column, err := c.Snapshot().SearchColumn(columnId)
if err != nil {
return entity.UnsetCombinedId, nil, err
}
c.mu.Lock()
- itemId, op, err := board.AddItemDraft(c.entity, author, unixTime, column.Id, title, message, files, metadata)
+ itemId, op, err := board.AddItemDraft(c.entity, author, unixTime, column.Id, title, metadata)
c.mu.Unlock()
if err != nil {
return entity.UnsetCombinedId, nil, err
@@ -58,6 +58,8 @@ func runBoardAddDraft(env *execenv.Env, opts boardAddDraftOptions, args []string
return err
}
+ // TODO: editor with single line, no message
+
if opts.messageFile != "" && opts.message == "" {
// Note: reuse the bug inputs
opts.title, opts.message, err = buginput.BugCreateFileInput(opts.messageFile)
@@ -77,7 +79,7 @@ func runBoardAddDraft(env *execenv.Env, opts boardAddDraftOptions, args []string
}
}
- id, _, err := b.AddItemDraft(columnId, opts.title, opts.message, nil)
+ id, _, err := b.AddItemDraft(columnId, opts.title)
if err != nil {
return err
}
@@ -73,7 +73,6 @@ type BoardDraftItem struct {
HumanId string `json:"human_id"`
Author Identity `json:"author"`
Title string `json:"title"`
- Message string `json:"message"`
}
func NewBoardDraftItem(item *board.Draft) BoardDraftItem {
@@ -83,7 +82,6 @@ func NewBoardDraftItem(item *board.Draft) BoardDraftItem {
HumanId: item.CombinedId().Human(),
Author: NewIdentity(item.Author()),
Title: item.Title(),
- Message: item.Message,
}
}
@@ -102,7 +100,6 @@ func NewBoardBugItem(item *board.BugItem) BoardBugItem {
HumanId: item.CombinedId().Human(),
Author: NewIdentity(item.Author()),
BugId: item.Bug.Snapshot().Id().String(),
- // TODO: add more?
}
}
@@ -16,9 +16,8 @@ type Draft struct {
// of the Operation that created the Draft
combinedId entity.CombinedId
- author identity.Interface
- title string
- Message string
+ author identity.Interface
+ title string
// Creation time of the comment.
// Should be used only for human display, never for ordering as we can't rely on it in a distributed system.
@@ -2,6 +2,7 @@ package board
import (
"github.com/git-bug/git-bug/entities/bug"
+ "github.com/git-bug/git-bug/entities/common"
"github.com/git-bug/git-bug/entities/identity"
"github.com/git-bug/git-bug/entity"
"github.com/git-bug/git-bug/entity/dag"
@@ -29,3 +30,10 @@ func (e *BugItem) Author() identity.Interface {
func (e *BugItem) Title() string {
return e.Bug.Snapshot().Title
}
+
+func (e *BugItem) Labels() []common.Label {
+ return e.Bug.Snapshot().Labels
+}
+
+// IsAuthored is a sign post method for gqlgen
+func (e *BugItem) IsAuthored() {}
@@ -6,7 +6,6 @@ import (
"github.com/git-bug/git-bug/entities/identity"
"github.com/git-bug/git-bug/entity"
"github.com/git-bug/git-bug/entity/dag"
- "github.com/git-bug/git-bug/repository"
"github.com/git-bug/git-bug/util/text"
"github.com/git-bug/git-bug/util/timestamp"
)
@@ -15,20 +14,14 @@ var _ Operation = &AddItemDraftOperation{}
type AddItemDraftOperation struct {
dag.OpBase
- ColumnId entity.Id `json:"column"`
- Title string `json:"title"`
- Message string `json:"message"`
- Files []repository.Hash `json:"files"`
+ ColumnId entity.Id `json:"column"`
+ Title string `json:"title"`
}
func (op *AddItemDraftOperation) Id() entity.Id {
return dag.IdOperation(op, &op.OpBase)
}
-func (op *AddItemDraftOperation) GetFiles() []repository.Hash {
- return op.Files
-}
-
func (op *AddItemDraftOperation) Validate() error {
if err := op.OpBase.Validate(op, AddItemDraftOp); err != nil {
return err
@@ -45,16 +38,6 @@ func (op *AddItemDraftOperation) Validate() error {
return fmt.Errorf("title has unsafe characters")
}
- if !text.Safe(op.Message) {
- return fmt.Errorf("message is not fully printable")
- }
-
- for _, file := range op.Files {
- if !file.IsValid() {
- return fmt.Errorf("invalid file hash")
- }
- }
-
return nil
}
@@ -69,7 +52,6 @@ func (op *AddItemDraftOperation) Apply(snapshot *Snapshot) {
combinedId: entity.CombineIds(snapshot.id, op.Id()),
author: op.Author(),
title: op.Title,
- Message: op.Message,
unixTime: timestamp.Timestamp(op.UnixTime),
})
@@ -79,19 +61,17 @@ func (op *AddItemDraftOperation) Apply(snapshot *Snapshot) {
}
}
-func NewAddItemDraftOp(author identity.Interface, unixTime int64, columnId entity.Id, title, message string, files []repository.Hash) *AddItemDraftOperation {
+func NewAddItemDraftOp(author identity.Interface, unixTime int64, columnId entity.Id, title string) *AddItemDraftOperation {
return &AddItemDraftOperation{
OpBase: dag.NewOpBase(AddItemDraftOp, author, unixTime),
ColumnId: columnId,
Title: title,
- Message: message,
- Files: files,
}
}
// AddItemDraft is a convenience function to add a draft item to a Board
-func AddItemDraft(b ReadWrite, author identity.Interface, unixTime int64, columnId entity.Id, title, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *AddItemDraftOperation, error) {
- op := NewAddItemDraftOp(author, unixTime, columnId, title, message, files)
+func AddItemDraft(b ReadWrite, author identity.Interface, unixTime int64, columnId entity.Id, title string, metadata map[string]string) (entity.CombinedId, *AddItemDraftOperation, error) {
+ op := NewAddItemDraftOp(author, unixTime, columnId, title)
for key, val := range metadata {
op.SetMetadata(key, val)
}
@@ -6,14 +6,10 @@ import (
"github.com/git-bug/git-bug/entities/identity"
"github.com/git-bug/git-bug/entity"
"github.com/git-bug/git-bug/entity/dag"
- "github.com/git-bug/git-bug/repository"
)
func TestAddItemDraftOpSerialize(t *testing.T) {
dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*AddItemDraftOperation, entity.Resolvers) {
- return NewAddItemDraftOp(author, unixTime, "foo", "title", "message", nil), nil
- })
- dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*AddItemDraftOperation, entity.Resolvers) {
- return NewAddItemDraftOp(author, unixTime, "foo", "title", "message", []repository.Hash{"hash1", "hash2"}), nil
+ return NewAddItemDraftOp(author, unixTime, "foo", "title"), nil
})
}