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