board_item.generated.go

   1// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
   2
   3package graph
   4
   5import (
   6	"context"
   7	"errors"
   8	"fmt"
   9	"strconv"
  10	"sync"
  11	"sync/atomic"
  12
  13	"github.com/99designs/gqlgen/graphql"
  14	"github.com/git-bug/git-bug/api/graphql/models"
  15	"github.com/git-bug/git-bug/entities/board"
  16	"github.com/git-bug/git-bug/entities/common"
  17	"github.com/git-bug/git-bug/entity"
  18	"github.com/vektah/gqlparser/v2/ast"
  19)
  20
  21// region    ************************** generated!.gotpl **************************
  22
  23type BoardItemBugResolver interface {
  24	Author(ctx context.Context, obj *board.BugItem) (models.IdentityWrapper, error)
  25}
  26type BoardItemDraftResolver interface {
  27	Author(ctx context.Context, obj *board.Draft) (models.IdentityWrapper, error)
  28
  29	Labels(ctx context.Context, obj *board.Draft) ([]common.Label, error)
  30}
  31
  32// endregion ************************** generated!.gotpl **************************
  33
  34// region    ***************************** args.gotpl *****************************
  35
  36// endregion ***************************** args.gotpl *****************************
  37
  38// region    ************************** directives.gotpl **************************
  39
  40// endregion ************************** directives.gotpl **************************
  41
  42// region    **************************** field.gotpl *****************************
  43
  44func (ec *executionContext) _BoardItemBug_id(ctx context.Context, field graphql.CollectedField, obj *board.BugItem) (ret graphql.Marshaler) {
  45	fc, err := ec.fieldContext_BoardItemBug_id(ctx, field)
  46	if err != nil {
  47		return graphql.Null
  48	}
  49	ctx = graphql.WithFieldContext(ctx, fc)
  50	defer func() {
  51		if r := recover(); r != nil {
  52			ec.Error(ctx, ec.Recover(ctx, r))
  53			ret = graphql.Null
  54		}
  55	}()
  56	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
  57		ctx = rctx // use context from middleware stack in children
  58		return obj.CombinedId(), nil
  59	})
  60	if err != nil {
  61		ec.Error(ctx, err)
  62		return graphql.Null
  63	}
  64	if resTmp == nil {
  65		if !graphql.HasFieldError(ctx, fc) {
  66			ec.Errorf(ctx, "must not be null")
  67		}
  68		return graphql.Null
  69	}
  70	res := resTmp.(entity.CombinedId)
  71	fc.Result = res
  72	return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res)
  73}
  74
  75func (ec *executionContext) fieldContext_BoardItemBug_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
  76	fc = &graphql.FieldContext{
  77		Object:     "BoardItemBug",
  78		Field:      field,
  79		IsMethod:   true,
  80		IsResolver: false,
  81		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
  82			return nil, errors.New("field of type CombinedId does not have child fields")
  83		},
  84	}
  85	return fc, nil
  86}
  87
  88func (ec *executionContext) _BoardItemBug_author(ctx context.Context, field graphql.CollectedField, obj *board.BugItem) (ret graphql.Marshaler) {
  89	fc, err := ec.fieldContext_BoardItemBug_author(ctx, field)
  90	if err != nil {
  91		return graphql.Null
  92	}
  93	ctx = graphql.WithFieldContext(ctx, fc)
  94	defer func() {
  95		if r := recover(); r != nil {
  96			ec.Error(ctx, ec.Recover(ctx, r))
  97			ret = graphql.Null
  98		}
  99	}()
 100	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 101		ctx = rctx // use context from middleware stack in children
 102		return ec.resolvers.BoardItemBug().Author(rctx, obj)
 103	})
 104	if err != nil {
 105		ec.Error(ctx, err)
 106		return graphql.Null
 107	}
 108	if resTmp == nil {
 109		if !graphql.HasFieldError(ctx, fc) {
 110			ec.Errorf(ctx, "must not be null")
 111		}
 112		return graphql.Null
 113	}
 114	res := resTmp.(models.IdentityWrapper)
 115	fc.Result = res
 116	return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 117}
 118
 119func (ec *executionContext) fieldContext_BoardItemBug_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 120	fc = &graphql.FieldContext{
 121		Object:     "BoardItemBug",
 122		Field:      field,
 123		IsMethod:   true,
 124		IsResolver: true,
 125		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 126			switch field.Name {
 127			case "id":
 128				return ec.fieldContext_Identity_id(ctx, field)
 129			case "humanId":
 130				return ec.fieldContext_Identity_humanId(ctx, field)
 131			case "name":
 132				return ec.fieldContext_Identity_name(ctx, field)
 133			case "email":
 134				return ec.fieldContext_Identity_email(ctx, field)
 135			case "login":
 136				return ec.fieldContext_Identity_login(ctx, field)
 137			case "displayName":
 138				return ec.fieldContext_Identity_displayName(ctx, field)
 139			case "avatarUrl":
 140				return ec.fieldContext_Identity_avatarUrl(ctx, field)
 141			case "isProtected":
 142				return ec.fieldContext_Identity_isProtected(ctx, field)
 143			}
 144			return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
 145		},
 146	}
 147	return fc, nil
 148}
 149
 150func (ec *executionContext) _BoardItemBug_title(ctx context.Context, field graphql.CollectedField, obj *board.BugItem) (ret graphql.Marshaler) {
 151	fc, err := ec.fieldContext_BoardItemBug_title(ctx, field)
 152	if err != nil {
 153		return graphql.Null
 154	}
 155	ctx = graphql.WithFieldContext(ctx, fc)
 156	defer func() {
 157		if r := recover(); r != nil {
 158			ec.Error(ctx, ec.Recover(ctx, r))
 159			ret = graphql.Null
 160		}
 161	}()
 162	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 163		ctx = rctx // use context from middleware stack in children
 164		return obj.Title(), nil
 165	})
 166	if err != nil {
 167		ec.Error(ctx, err)
 168		return graphql.Null
 169	}
 170	if resTmp == nil {
 171		if !graphql.HasFieldError(ctx, fc) {
 172			ec.Errorf(ctx, "must not be null")
 173		}
 174		return graphql.Null
 175	}
 176	res := resTmp.(string)
 177	fc.Result = res
 178	return ec.marshalNString2string(ctx, field.Selections, res)
 179}
 180
 181func (ec *executionContext) fieldContext_BoardItemBug_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 182	fc = &graphql.FieldContext{
 183		Object:     "BoardItemBug",
 184		Field:      field,
 185		IsMethod:   true,
 186		IsResolver: false,
 187		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 188			return nil, errors.New("field of type String does not have child fields")
 189		},
 190	}
 191	return fc, nil
 192}
 193
 194func (ec *executionContext) _BoardItemBug_labels(ctx context.Context, field graphql.CollectedField, obj *board.BugItem) (ret graphql.Marshaler) {
 195	fc, err := ec.fieldContext_BoardItemBug_labels(ctx, field)
 196	if err != nil {
 197		return graphql.Null
 198	}
 199	ctx = graphql.WithFieldContext(ctx, fc)
 200	defer func() {
 201		if r := recover(); r != nil {
 202			ec.Error(ctx, ec.Recover(ctx, r))
 203			ret = graphql.Null
 204		}
 205	}()
 206	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 207		ctx = rctx // use context from middleware stack in children
 208		return obj.Labels(), nil
 209	})
 210	if err != nil {
 211		ec.Error(ctx, err)
 212		return graphql.Null
 213	}
 214	if resTmp == nil {
 215		if !graphql.HasFieldError(ctx, fc) {
 216			ec.Errorf(ctx, "must not be null")
 217		}
 218		return graphql.Null
 219	}
 220	res := resTmp.([]common.Label)
 221	fc.Result = res
 222	return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res)
 223}
 224
 225func (ec *executionContext) fieldContext_BoardItemBug_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 226	fc = &graphql.FieldContext{
 227		Object:     "BoardItemBug",
 228		Field:      field,
 229		IsMethod:   true,
 230		IsResolver: false,
 231		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 232			switch field.Name {
 233			case "name":
 234				return ec.fieldContext_Label_name(ctx, field)
 235			case "color":
 236				return ec.fieldContext_Label_color(ctx, field)
 237			}
 238			return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
 239		},
 240	}
 241	return fc, nil
 242}
 243
 244func (ec *executionContext) _BoardItemConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemConnection) (ret graphql.Marshaler) {
 245	fc, err := ec.fieldContext_BoardItemConnection_edges(ctx, field)
 246	if err != nil {
 247		return graphql.Null
 248	}
 249	ctx = graphql.WithFieldContext(ctx, fc)
 250	defer func() {
 251		if r := recover(); r != nil {
 252			ec.Error(ctx, ec.Recover(ctx, r))
 253			ret = graphql.Null
 254		}
 255	}()
 256	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 257		ctx = rctx // use context from middleware stack in children
 258		return obj.Edges, nil
 259	})
 260	if err != nil {
 261		ec.Error(ctx, err)
 262		return graphql.Null
 263	}
 264	if resTmp == nil {
 265		if !graphql.HasFieldError(ctx, fc) {
 266			ec.Errorf(ctx, "must not be null")
 267		}
 268		return graphql.Null
 269	}
 270	res := resTmp.([]*models.BoardItemEdge)
 271	fc.Result = res
 272	return ec.marshalNBoardItemEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEdgeᚄ(ctx, field.Selections, res)
 273}
 274
 275func (ec *executionContext) fieldContext_BoardItemConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 276	fc = &graphql.FieldContext{
 277		Object:     "BoardItemConnection",
 278		Field:      field,
 279		IsMethod:   false,
 280		IsResolver: false,
 281		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 282			switch field.Name {
 283			case "cursor":
 284				return ec.fieldContext_BoardItemEdge_cursor(ctx, field)
 285			case "node":
 286				return ec.fieldContext_BoardItemEdge_node(ctx, field)
 287			}
 288			return nil, fmt.Errorf("no field named %q was found under type BoardItemEdge", field.Name)
 289		},
 290	}
 291	return fc, nil
 292}
 293
 294func (ec *executionContext) _BoardItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemConnection) (ret graphql.Marshaler) {
 295	fc, err := ec.fieldContext_BoardItemConnection_nodes(ctx, field)
 296	if err != nil {
 297		return graphql.Null
 298	}
 299	ctx = graphql.WithFieldContext(ctx, fc)
 300	defer func() {
 301		if r := recover(); r != nil {
 302			ec.Error(ctx, ec.Recover(ctx, r))
 303			ret = graphql.Null
 304		}
 305	}()
 306	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 307		ctx = rctx // use context from middleware stack in children
 308		return obj.Nodes, nil
 309	})
 310	if err != nil {
 311		ec.Error(ctx, err)
 312		return graphql.Null
 313	}
 314	if resTmp == nil {
 315		if !graphql.HasFieldError(ctx, fc) {
 316			ec.Errorf(ctx, "must not be null")
 317		}
 318		return graphql.Null
 319	}
 320	res := resTmp.([]board.Item)
 321	fc.Result = res
 322	return ec.marshalNBoardItem2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItemᚄ(ctx, field.Selections, res)
 323}
 324
 325func (ec *executionContext) fieldContext_BoardItemConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 326	fc = &graphql.FieldContext{
 327		Object:     "BoardItemConnection",
 328		Field:      field,
 329		IsMethod:   false,
 330		IsResolver: false,
 331		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 332			return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
 333		},
 334	}
 335	return fc, nil
 336}
 337
 338func (ec *executionContext) _BoardItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemConnection) (ret graphql.Marshaler) {
 339	fc, err := ec.fieldContext_BoardItemConnection_pageInfo(ctx, field)
 340	if err != nil {
 341		return graphql.Null
 342	}
 343	ctx = graphql.WithFieldContext(ctx, fc)
 344	defer func() {
 345		if r := recover(); r != nil {
 346			ec.Error(ctx, ec.Recover(ctx, r))
 347			ret = graphql.Null
 348		}
 349	}()
 350	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 351		ctx = rctx // use context from middleware stack in children
 352		return obj.PageInfo, nil
 353	})
 354	if err != nil {
 355		ec.Error(ctx, err)
 356		return graphql.Null
 357	}
 358	if resTmp == nil {
 359		if !graphql.HasFieldError(ctx, fc) {
 360			ec.Errorf(ctx, "must not be null")
 361		}
 362		return graphql.Null
 363	}
 364	res := resTmp.(*models.PageInfo)
 365	fc.Result = res
 366	return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
 367}
 368
 369func (ec *executionContext) fieldContext_BoardItemConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 370	fc = &graphql.FieldContext{
 371		Object:     "BoardItemConnection",
 372		Field:      field,
 373		IsMethod:   false,
 374		IsResolver: false,
 375		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 376			switch field.Name {
 377			case "hasNextPage":
 378				return ec.fieldContext_PageInfo_hasNextPage(ctx, field)
 379			case "hasPreviousPage":
 380				return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field)
 381			case "startCursor":
 382				return ec.fieldContext_PageInfo_startCursor(ctx, field)
 383			case "endCursor":
 384				return ec.fieldContext_PageInfo_endCursor(ctx, field)
 385			}
 386			return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name)
 387		},
 388	}
 389	return fc, nil
 390}
 391
 392func (ec *executionContext) _BoardItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemConnection) (ret graphql.Marshaler) {
 393	fc, err := ec.fieldContext_BoardItemConnection_totalCount(ctx, field)
 394	if err != nil {
 395		return graphql.Null
 396	}
 397	ctx = graphql.WithFieldContext(ctx, fc)
 398	defer func() {
 399		if r := recover(); r != nil {
 400			ec.Error(ctx, ec.Recover(ctx, r))
 401			ret = graphql.Null
 402		}
 403	}()
 404	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 405		ctx = rctx // use context from middleware stack in children
 406		return obj.TotalCount, nil
 407	})
 408	if err != nil {
 409		ec.Error(ctx, err)
 410		return graphql.Null
 411	}
 412	if resTmp == nil {
 413		if !graphql.HasFieldError(ctx, fc) {
 414			ec.Errorf(ctx, "must not be null")
 415		}
 416		return graphql.Null
 417	}
 418	res := resTmp.(int)
 419	fc.Result = res
 420	return ec.marshalNInt2int(ctx, field.Selections, res)
 421}
 422
 423func (ec *executionContext) fieldContext_BoardItemConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 424	fc = &graphql.FieldContext{
 425		Object:     "BoardItemConnection",
 426		Field:      field,
 427		IsMethod:   false,
 428		IsResolver: false,
 429		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 430			return nil, errors.New("field of type Int does not have child fields")
 431		},
 432	}
 433	return fc, nil
 434}
 435
 436func (ec *executionContext) _BoardItemDraft_id(ctx context.Context, field graphql.CollectedField, obj *board.Draft) (ret graphql.Marshaler) {
 437	fc, err := ec.fieldContext_BoardItemDraft_id(ctx, field)
 438	if err != nil {
 439		return graphql.Null
 440	}
 441	ctx = graphql.WithFieldContext(ctx, fc)
 442	defer func() {
 443		if r := recover(); r != nil {
 444			ec.Error(ctx, ec.Recover(ctx, r))
 445			ret = graphql.Null
 446		}
 447	}()
 448	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 449		ctx = rctx // use context from middleware stack in children
 450		return obj.CombinedId(), nil
 451	})
 452	if err != nil {
 453		ec.Error(ctx, err)
 454		return graphql.Null
 455	}
 456	if resTmp == nil {
 457		if !graphql.HasFieldError(ctx, fc) {
 458			ec.Errorf(ctx, "must not be null")
 459		}
 460		return graphql.Null
 461	}
 462	res := resTmp.(entity.CombinedId)
 463	fc.Result = res
 464	return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res)
 465}
 466
 467func (ec *executionContext) fieldContext_BoardItemDraft_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 468	fc = &graphql.FieldContext{
 469		Object:     "BoardItemDraft",
 470		Field:      field,
 471		IsMethod:   true,
 472		IsResolver: false,
 473		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 474			return nil, errors.New("field of type CombinedId does not have child fields")
 475		},
 476	}
 477	return fc, nil
 478}
 479
 480func (ec *executionContext) _BoardItemDraft_author(ctx context.Context, field graphql.CollectedField, obj *board.Draft) (ret graphql.Marshaler) {
 481	fc, err := ec.fieldContext_BoardItemDraft_author(ctx, field)
 482	if err != nil {
 483		return graphql.Null
 484	}
 485	ctx = graphql.WithFieldContext(ctx, fc)
 486	defer func() {
 487		if r := recover(); r != nil {
 488			ec.Error(ctx, ec.Recover(ctx, r))
 489			ret = graphql.Null
 490		}
 491	}()
 492	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 493		ctx = rctx // use context from middleware stack in children
 494		return ec.resolvers.BoardItemDraft().Author(rctx, obj)
 495	})
 496	if err != nil {
 497		ec.Error(ctx, err)
 498		return graphql.Null
 499	}
 500	if resTmp == nil {
 501		if !graphql.HasFieldError(ctx, fc) {
 502			ec.Errorf(ctx, "must not be null")
 503		}
 504		return graphql.Null
 505	}
 506	res := resTmp.(models.IdentityWrapper)
 507	fc.Result = res
 508	return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res)
 509}
 510
 511func (ec *executionContext) fieldContext_BoardItemDraft_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 512	fc = &graphql.FieldContext{
 513		Object:     "BoardItemDraft",
 514		Field:      field,
 515		IsMethod:   true,
 516		IsResolver: true,
 517		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 518			switch field.Name {
 519			case "id":
 520				return ec.fieldContext_Identity_id(ctx, field)
 521			case "humanId":
 522				return ec.fieldContext_Identity_humanId(ctx, field)
 523			case "name":
 524				return ec.fieldContext_Identity_name(ctx, field)
 525			case "email":
 526				return ec.fieldContext_Identity_email(ctx, field)
 527			case "login":
 528				return ec.fieldContext_Identity_login(ctx, field)
 529			case "displayName":
 530				return ec.fieldContext_Identity_displayName(ctx, field)
 531			case "avatarUrl":
 532				return ec.fieldContext_Identity_avatarUrl(ctx, field)
 533			case "isProtected":
 534				return ec.fieldContext_Identity_isProtected(ctx, field)
 535			}
 536			return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
 537		},
 538	}
 539	return fc, nil
 540}
 541
 542func (ec *executionContext) _BoardItemDraft_title(ctx context.Context, field graphql.CollectedField, obj *board.Draft) (ret graphql.Marshaler) {
 543	fc, err := ec.fieldContext_BoardItemDraft_title(ctx, field)
 544	if err != nil {
 545		return graphql.Null
 546	}
 547	ctx = graphql.WithFieldContext(ctx, fc)
 548	defer func() {
 549		if r := recover(); r != nil {
 550			ec.Error(ctx, ec.Recover(ctx, r))
 551			ret = graphql.Null
 552		}
 553	}()
 554	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 555		ctx = rctx // use context from middleware stack in children
 556		return obj.Title(), nil
 557	})
 558	if err != nil {
 559		ec.Error(ctx, err)
 560		return graphql.Null
 561	}
 562	if resTmp == nil {
 563		if !graphql.HasFieldError(ctx, fc) {
 564			ec.Errorf(ctx, "must not be null")
 565		}
 566		return graphql.Null
 567	}
 568	res := resTmp.(string)
 569	fc.Result = res
 570	return ec.marshalNString2string(ctx, field.Selections, res)
 571}
 572
 573func (ec *executionContext) fieldContext_BoardItemDraft_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 574	fc = &graphql.FieldContext{
 575		Object:     "BoardItemDraft",
 576		Field:      field,
 577		IsMethod:   true,
 578		IsResolver: false,
 579		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 580			return nil, errors.New("field of type String does not have child fields")
 581		},
 582	}
 583	return fc, nil
 584}
 585
 586func (ec *executionContext) _BoardItemDraft_labels(ctx context.Context, field graphql.CollectedField, obj *board.Draft) (ret graphql.Marshaler) {
 587	fc, err := ec.fieldContext_BoardItemDraft_labels(ctx, field)
 588	if err != nil {
 589		return graphql.Null
 590	}
 591	ctx = graphql.WithFieldContext(ctx, fc)
 592	defer func() {
 593		if r := recover(); r != nil {
 594			ec.Error(ctx, ec.Recover(ctx, r))
 595			ret = graphql.Null
 596		}
 597	}()
 598	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 599		ctx = rctx // use context from middleware stack in children
 600		return ec.resolvers.BoardItemDraft().Labels(rctx, obj)
 601	})
 602	if err != nil {
 603		ec.Error(ctx, err)
 604		return graphql.Null
 605	}
 606	if resTmp == nil {
 607		if !graphql.HasFieldError(ctx, fc) {
 608			ec.Errorf(ctx, "must not be null")
 609		}
 610		return graphql.Null
 611	}
 612	res := resTmp.([]common.Label)
 613	fc.Result = res
 614	return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res)
 615}
 616
 617func (ec *executionContext) fieldContext_BoardItemDraft_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 618	fc = &graphql.FieldContext{
 619		Object:     "BoardItemDraft",
 620		Field:      field,
 621		IsMethod:   true,
 622		IsResolver: true,
 623		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 624			switch field.Name {
 625			case "name":
 626				return ec.fieldContext_Label_name(ctx, field)
 627			case "color":
 628				return ec.fieldContext_Label_color(ctx, field)
 629			}
 630			return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
 631		},
 632	}
 633	return fc, nil
 634}
 635
 636func (ec *executionContext) _BoardItemEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemEdge) (ret graphql.Marshaler) {
 637	fc, err := ec.fieldContext_BoardItemEdge_cursor(ctx, field)
 638	if err != nil {
 639		return graphql.Null
 640	}
 641	ctx = graphql.WithFieldContext(ctx, fc)
 642	defer func() {
 643		if r := recover(); r != nil {
 644			ec.Error(ctx, ec.Recover(ctx, r))
 645			ret = graphql.Null
 646		}
 647	}()
 648	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 649		ctx = rctx // use context from middleware stack in children
 650		return obj.Cursor, nil
 651	})
 652	if err != nil {
 653		ec.Error(ctx, err)
 654		return graphql.Null
 655	}
 656	if resTmp == nil {
 657		if !graphql.HasFieldError(ctx, fc) {
 658			ec.Errorf(ctx, "must not be null")
 659		}
 660		return graphql.Null
 661	}
 662	res := resTmp.(string)
 663	fc.Result = res
 664	return ec.marshalNString2string(ctx, field.Selections, res)
 665}
 666
 667func (ec *executionContext) fieldContext_BoardItemEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 668	fc = &graphql.FieldContext{
 669		Object:     "BoardItemEdge",
 670		Field:      field,
 671		IsMethod:   false,
 672		IsResolver: false,
 673		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 674			return nil, errors.New("field of type String does not have child fields")
 675		},
 676	}
 677	return fc, nil
 678}
 679
 680func (ec *executionContext) _BoardItemEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BoardItemEdge) (ret graphql.Marshaler) {
 681	fc, err := ec.fieldContext_BoardItemEdge_node(ctx, field)
 682	if err != nil {
 683		return graphql.Null
 684	}
 685	ctx = graphql.WithFieldContext(ctx, fc)
 686	defer func() {
 687		if r := recover(); r != nil {
 688			ec.Error(ctx, ec.Recover(ctx, r))
 689			ret = graphql.Null
 690		}
 691	}()
 692	resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
 693		ctx = rctx // use context from middleware stack in children
 694		return obj.Node, nil
 695	})
 696	if err != nil {
 697		ec.Error(ctx, err)
 698		return graphql.Null
 699	}
 700	if resTmp == nil {
 701		if !graphql.HasFieldError(ctx, fc) {
 702			ec.Errorf(ctx, "must not be null")
 703		}
 704		return graphql.Null
 705	}
 706	res := resTmp.(board.Item)
 707	fc.Result = res
 708	return ec.marshalNBoardItem2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItem(ctx, field.Selections, res)
 709}
 710
 711func (ec *executionContext) fieldContext_BoardItemEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
 712	fc = &graphql.FieldContext{
 713		Object:     "BoardItemEdge",
 714		Field:      field,
 715		IsMethod:   false,
 716		IsResolver: false,
 717		Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
 718			return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
 719		},
 720	}
 721	return fc, nil
 722}
 723
 724// endregion **************************** field.gotpl *****************************
 725
 726// region    **************************** input.gotpl *****************************
 727
 728// endregion **************************** input.gotpl *****************************
 729
 730// region    ************************** interface.gotpl ***************************
 731
 732func (ec *executionContext) _BoardItem(ctx context.Context, sel ast.SelectionSet, obj board.Item) graphql.Marshaler {
 733	switch obj := (obj).(type) {
 734	case nil:
 735		return graphql.Null
 736	case *board.Draft:
 737		if obj == nil {
 738			return graphql.Null
 739		}
 740		return ec._BoardItemDraft(ctx, sel, obj)
 741	case *board.BugItem:
 742		if obj == nil {
 743			return graphql.Null
 744		}
 745		return ec._BoardItemBug(ctx, sel, obj)
 746	default:
 747		panic(fmt.Errorf("unexpected type %T", obj))
 748	}
 749}
 750
 751// endregion ************************** interface.gotpl ***************************
 752
 753// region    **************************** object.gotpl ****************************
 754
 755var boardItemBugImplementors = []string{"BoardItemBug", "BoardItem", "Authored"}
 756
 757func (ec *executionContext) _BoardItemBug(ctx context.Context, sel ast.SelectionSet, obj *board.BugItem) graphql.Marshaler {
 758	fields := graphql.CollectFields(ec.OperationContext, sel, boardItemBugImplementors)
 759
 760	out := graphql.NewFieldSet(fields)
 761	deferred := make(map[string]*graphql.FieldSet)
 762	for i, field := range fields {
 763		switch field.Name {
 764		case "__typename":
 765			out.Values[i] = graphql.MarshalString("BoardItemBug")
 766		case "id":
 767			out.Values[i] = ec._BoardItemBug_id(ctx, field, obj)
 768			if out.Values[i] == graphql.Null {
 769				atomic.AddUint32(&out.Invalids, 1)
 770			}
 771		case "author":
 772			field := field
 773
 774			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
 775				defer func() {
 776					if r := recover(); r != nil {
 777						ec.Error(ctx, ec.Recover(ctx, r))
 778					}
 779				}()
 780				res = ec._BoardItemBug_author(ctx, field, obj)
 781				if res == graphql.Null {
 782					atomic.AddUint32(&fs.Invalids, 1)
 783				}
 784				return res
 785			}
 786
 787			if field.Deferrable != nil {
 788				dfs, ok := deferred[field.Deferrable.Label]
 789				di := 0
 790				if ok {
 791					dfs.AddField(field)
 792					di = len(dfs.Values) - 1
 793				} else {
 794					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
 795					deferred[field.Deferrable.Label] = dfs
 796				}
 797				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
 798					return innerFunc(ctx, dfs)
 799				})
 800
 801				// don't run the out.Concurrently() call below
 802				out.Values[i] = graphql.Null
 803				continue
 804			}
 805
 806			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
 807		case "title":
 808			out.Values[i] = ec._BoardItemBug_title(ctx, field, obj)
 809			if out.Values[i] == graphql.Null {
 810				atomic.AddUint32(&out.Invalids, 1)
 811			}
 812		case "labels":
 813			out.Values[i] = ec._BoardItemBug_labels(ctx, field, obj)
 814			if out.Values[i] == graphql.Null {
 815				atomic.AddUint32(&out.Invalids, 1)
 816			}
 817		default:
 818			panic("unknown field " + strconv.Quote(field.Name))
 819		}
 820	}
 821	out.Dispatch(ctx)
 822	if out.Invalids > 0 {
 823		return graphql.Null
 824	}
 825
 826	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
 827
 828	for label, dfs := range deferred {
 829		ec.processDeferredGroup(graphql.DeferredGroup{
 830			Label:    label,
 831			Path:     graphql.GetPath(ctx),
 832			FieldSet: dfs,
 833			Context:  ctx,
 834		})
 835	}
 836
 837	return out
 838}
 839
 840var boardItemConnectionImplementors = []string{"BoardItemConnection"}
 841
 842func (ec *executionContext) _BoardItemConnection(ctx context.Context, sel ast.SelectionSet, obj *models.BoardItemConnection) graphql.Marshaler {
 843	fields := graphql.CollectFields(ec.OperationContext, sel, boardItemConnectionImplementors)
 844
 845	out := graphql.NewFieldSet(fields)
 846	deferred := make(map[string]*graphql.FieldSet)
 847	for i, field := range fields {
 848		switch field.Name {
 849		case "__typename":
 850			out.Values[i] = graphql.MarshalString("BoardItemConnection")
 851		case "edges":
 852			out.Values[i] = ec._BoardItemConnection_edges(ctx, field, obj)
 853			if out.Values[i] == graphql.Null {
 854				out.Invalids++
 855			}
 856		case "nodes":
 857			out.Values[i] = ec._BoardItemConnection_nodes(ctx, field, obj)
 858			if out.Values[i] == graphql.Null {
 859				out.Invalids++
 860			}
 861		case "pageInfo":
 862			out.Values[i] = ec._BoardItemConnection_pageInfo(ctx, field, obj)
 863			if out.Values[i] == graphql.Null {
 864				out.Invalids++
 865			}
 866		case "totalCount":
 867			out.Values[i] = ec._BoardItemConnection_totalCount(ctx, field, obj)
 868			if out.Values[i] == graphql.Null {
 869				out.Invalids++
 870			}
 871		default:
 872			panic("unknown field " + strconv.Quote(field.Name))
 873		}
 874	}
 875	out.Dispatch(ctx)
 876	if out.Invalids > 0 {
 877		return graphql.Null
 878	}
 879
 880	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
 881
 882	for label, dfs := range deferred {
 883		ec.processDeferredGroup(graphql.DeferredGroup{
 884			Label:    label,
 885			Path:     graphql.GetPath(ctx),
 886			FieldSet: dfs,
 887			Context:  ctx,
 888		})
 889	}
 890
 891	return out
 892}
 893
 894var boardItemDraftImplementors = []string{"BoardItemDraft", "BoardItem", "Authored"}
 895
 896func (ec *executionContext) _BoardItemDraft(ctx context.Context, sel ast.SelectionSet, obj *board.Draft) graphql.Marshaler {
 897	fields := graphql.CollectFields(ec.OperationContext, sel, boardItemDraftImplementors)
 898
 899	out := graphql.NewFieldSet(fields)
 900	deferred := make(map[string]*graphql.FieldSet)
 901	for i, field := range fields {
 902		switch field.Name {
 903		case "__typename":
 904			out.Values[i] = graphql.MarshalString("BoardItemDraft")
 905		case "id":
 906			out.Values[i] = ec._BoardItemDraft_id(ctx, field, obj)
 907			if out.Values[i] == graphql.Null {
 908				atomic.AddUint32(&out.Invalids, 1)
 909			}
 910		case "author":
 911			field := field
 912
 913			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
 914				defer func() {
 915					if r := recover(); r != nil {
 916						ec.Error(ctx, ec.Recover(ctx, r))
 917					}
 918				}()
 919				res = ec._BoardItemDraft_author(ctx, field, obj)
 920				if res == graphql.Null {
 921					atomic.AddUint32(&fs.Invalids, 1)
 922				}
 923				return res
 924			}
 925
 926			if field.Deferrable != nil {
 927				dfs, ok := deferred[field.Deferrable.Label]
 928				di := 0
 929				if ok {
 930					dfs.AddField(field)
 931					di = len(dfs.Values) - 1
 932				} else {
 933					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
 934					deferred[field.Deferrable.Label] = dfs
 935				}
 936				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
 937					return innerFunc(ctx, dfs)
 938				})
 939
 940				// don't run the out.Concurrently() call below
 941				out.Values[i] = graphql.Null
 942				continue
 943			}
 944
 945			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
 946		case "title":
 947			out.Values[i] = ec._BoardItemDraft_title(ctx, field, obj)
 948			if out.Values[i] == graphql.Null {
 949				atomic.AddUint32(&out.Invalids, 1)
 950			}
 951		case "labels":
 952			field := field
 953
 954			innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
 955				defer func() {
 956					if r := recover(); r != nil {
 957						ec.Error(ctx, ec.Recover(ctx, r))
 958					}
 959				}()
 960				res = ec._BoardItemDraft_labels(ctx, field, obj)
 961				if res == graphql.Null {
 962					atomic.AddUint32(&fs.Invalids, 1)
 963				}
 964				return res
 965			}
 966
 967			if field.Deferrable != nil {
 968				dfs, ok := deferred[field.Deferrable.Label]
 969				di := 0
 970				if ok {
 971					dfs.AddField(field)
 972					di = len(dfs.Values) - 1
 973				} else {
 974					dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
 975					deferred[field.Deferrable.Label] = dfs
 976				}
 977				dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
 978					return innerFunc(ctx, dfs)
 979				})
 980
 981				// don't run the out.Concurrently() call below
 982				out.Values[i] = graphql.Null
 983				continue
 984			}
 985
 986			out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
 987		default:
 988			panic("unknown field " + strconv.Quote(field.Name))
 989		}
 990	}
 991	out.Dispatch(ctx)
 992	if out.Invalids > 0 {
 993		return graphql.Null
 994	}
 995
 996	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
 997
 998	for label, dfs := range deferred {
 999		ec.processDeferredGroup(graphql.DeferredGroup{
1000			Label:    label,
1001			Path:     graphql.GetPath(ctx),
1002			FieldSet: dfs,
1003			Context:  ctx,
1004		})
1005	}
1006
1007	return out
1008}
1009
1010var boardItemEdgeImplementors = []string{"BoardItemEdge"}
1011
1012func (ec *executionContext) _BoardItemEdge(ctx context.Context, sel ast.SelectionSet, obj *models.BoardItemEdge) graphql.Marshaler {
1013	fields := graphql.CollectFields(ec.OperationContext, sel, boardItemEdgeImplementors)
1014
1015	out := graphql.NewFieldSet(fields)
1016	deferred := make(map[string]*graphql.FieldSet)
1017	for i, field := range fields {
1018		switch field.Name {
1019		case "__typename":
1020			out.Values[i] = graphql.MarshalString("BoardItemEdge")
1021		case "cursor":
1022			out.Values[i] = ec._BoardItemEdge_cursor(ctx, field, obj)
1023			if out.Values[i] == graphql.Null {
1024				out.Invalids++
1025			}
1026		case "node":
1027			out.Values[i] = ec._BoardItemEdge_node(ctx, field, obj)
1028			if out.Values[i] == graphql.Null {
1029				out.Invalids++
1030			}
1031		default:
1032			panic("unknown field " + strconv.Quote(field.Name))
1033		}
1034	}
1035	out.Dispatch(ctx)
1036	if out.Invalids > 0 {
1037		return graphql.Null
1038	}
1039
1040	atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1041
1042	for label, dfs := range deferred {
1043		ec.processDeferredGroup(graphql.DeferredGroup{
1044			Label:    label,
1045			Path:     graphql.GetPath(ctx),
1046			FieldSet: dfs,
1047			Context:  ctx,
1048		})
1049	}
1050
1051	return out
1052}
1053
1054// endregion **************************** object.gotpl ****************************
1055
1056// region    ***************************** type.gotpl *****************************
1057
1058func (ec *executionContext) marshalNBoardItem2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItem(ctx context.Context, sel ast.SelectionSet, v board.Item) graphql.Marshaler {
1059	if v == nil {
1060		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
1061			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
1062		}
1063		return graphql.Null
1064	}
1065	return ec._BoardItem(ctx, sel, v)
1066}
1067
1068func (ec *executionContext) marshalNBoardItem2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItemᚄ(ctx context.Context, sel ast.SelectionSet, v []board.Item) graphql.Marshaler {
1069	ret := make(graphql.Array, len(v))
1070	var wg sync.WaitGroup
1071	isLen1 := len(v) == 1
1072	if !isLen1 {
1073		wg.Add(len(v))
1074	}
1075	for i := range v {
1076		i := i
1077		fc := &graphql.FieldContext{
1078			Index:  &i,
1079			Result: &v[i],
1080		}
1081		ctx := graphql.WithFieldContext(ctx, fc)
1082		f := func(i int) {
1083			defer func() {
1084				if r := recover(); r != nil {
1085					ec.Error(ctx, ec.Recover(ctx, r))
1086					ret = nil
1087				}
1088			}()
1089			if !isLen1 {
1090				defer wg.Done()
1091			}
1092			ret[i] = ec.marshalNBoardItem2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋboardᚐItem(ctx, sel, v[i])
1093		}
1094		if isLen1 {
1095			f(i)
1096		} else {
1097			go f(i)
1098		}
1099
1100	}
1101	wg.Wait()
1102
1103	for _, e := range ret {
1104		if e == graphql.Null {
1105			return graphql.Null
1106		}
1107	}
1108
1109	return ret
1110}
1111
1112func (ec *executionContext) marshalNBoardItemConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemConnection(ctx context.Context, sel ast.SelectionSet, v models.BoardItemConnection) graphql.Marshaler {
1113	return ec._BoardItemConnection(ctx, sel, &v)
1114}
1115
1116func (ec *executionContext) marshalNBoardItemConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemConnection(ctx context.Context, sel ast.SelectionSet, v *models.BoardItemConnection) graphql.Marshaler {
1117	if v == nil {
1118		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
1119			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
1120		}
1121		return graphql.Null
1122	}
1123	return ec._BoardItemConnection(ctx, sel, v)
1124}
1125
1126func (ec *executionContext) marshalNBoardItemEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.BoardItemEdge) graphql.Marshaler {
1127	ret := make(graphql.Array, len(v))
1128	var wg sync.WaitGroup
1129	isLen1 := len(v) == 1
1130	if !isLen1 {
1131		wg.Add(len(v))
1132	}
1133	for i := range v {
1134		i := i
1135		fc := &graphql.FieldContext{
1136			Index:  &i,
1137			Result: &v[i],
1138		}
1139		ctx := graphql.WithFieldContext(ctx, fc)
1140		f := func(i int) {
1141			defer func() {
1142				if r := recover(); r != nil {
1143					ec.Error(ctx, ec.Recover(ctx, r))
1144					ret = nil
1145				}
1146			}()
1147			if !isLen1 {
1148				defer wg.Done()
1149			}
1150			ret[i] = ec.marshalNBoardItemEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEdge(ctx, sel, v[i])
1151		}
1152		if isLen1 {
1153			f(i)
1154		} else {
1155			go f(i)
1156		}
1157
1158	}
1159	wg.Wait()
1160
1161	for _, e := range ret {
1162		if e == graphql.Null {
1163			return graphql.Null
1164		}
1165	}
1166
1167	return ret
1168}
1169
1170func (ec *executionContext) marshalNBoardItemEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBoardItemEdge(ctx context.Context, sel ast.SelectionSet, v *models.BoardItemEdge) graphql.Marshaler {
1171	if v == nil {
1172		if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
1173			ec.Errorf(ctx, "the requested element is null which the schema does not allow")
1174		}
1175		return graphql.Null
1176	}
1177	return ec._BoardItemEdge(ctx, sel, v)
1178}
1179
1180// endregion ***************************** type.gotpl *****************************