gen_graph.go

   1// Code generated by github.com/vektah/gqlgen, DO NOT EDIT.
   2
   3package graph
   4
   5import (
   6	"bytes"
   7	context "context"
   8	fmt "fmt"
   9	strconv "strconv"
  10	time "time"
  11
  12	bug "github.com/MichaelMure/git-bug/bug"
  13	operations "github.com/MichaelMure/git-bug/bug/operations"
  14	models "github.com/MichaelMure/git-bug/graphql/models"
  15	graphql "github.com/vektah/gqlgen/graphql"
  16	introspection "github.com/vektah/gqlgen/neelance/introspection"
  17	query "github.com/vektah/gqlgen/neelance/query"
  18	schema "github.com/vektah/gqlgen/neelance/schema"
  19)
  20
  21// MakeExecutableSchema creates an ExecutableSchema from the Resolvers interface.
  22func MakeExecutableSchema(resolvers Resolvers) graphql.ExecutableSchema {
  23	return &executableSchema{resolvers: resolvers}
  24}
  25
  26// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
  27func NewExecutableSchema(resolvers ResolverRoot) graphql.ExecutableSchema {
  28	return MakeExecutableSchema(shortMapper{r: resolvers})
  29}
  30
  31type Resolvers interface {
  32	AddCommentOperation_date(ctx context.Context, obj *operations.AddCommentOperation) (time.Time, error)
  33
  34	Bug_status(ctx context.Context, obj *bug.Snapshot) (models.Status, error)
  35
  36	Bug_comments(ctx context.Context, obj *bug.Snapshot, input models.ConnectionInput) (models.CommentConnection, error)
  37	Bug_operations(ctx context.Context, obj *bug.Snapshot, input models.ConnectionInput) (models.OperationConnection, error)
  38
  39	CreateOperation_date(ctx context.Context, obj *operations.CreateOperation) (time.Time, error)
  40
  41	LabelChangeOperation_date(ctx context.Context, obj *operations.LabelChangeOperation) (time.Time, error)
  42
  43	Query_defaultRepository(ctx context.Context) (*models.Repository, error)
  44	Query_repository(ctx context.Context, id string) (*models.Repository, error)
  45
  46	Repository_allBugs(ctx context.Context, obj *models.Repository, input models.ConnectionInput) (models.BugConnection, error)
  47	Repository_bug(ctx context.Context, obj *models.Repository, prefix string) (*bug.Snapshot, error)
  48
  49	SetStatusOperation_date(ctx context.Context, obj *operations.SetStatusOperation) (time.Time, error)
  50	SetStatusOperation_status(ctx context.Context, obj *operations.SetStatusOperation) (models.Status, error)
  51
  52	SetTitleOperation_date(ctx context.Context, obj *operations.SetTitleOperation) (time.Time, error)
  53}
  54
  55type ResolverRoot interface {
  56	AddCommentOperation() AddCommentOperationResolver
  57	Bug() BugResolver
  58	CreateOperation() CreateOperationResolver
  59	LabelChangeOperation() LabelChangeOperationResolver
  60	Query() QueryResolver
  61	Repository() RepositoryResolver
  62	SetStatusOperation() SetStatusOperationResolver
  63	SetTitleOperation() SetTitleOperationResolver
  64}
  65type AddCommentOperationResolver interface {
  66	Date(ctx context.Context, obj *operations.AddCommentOperation) (time.Time, error)
  67}
  68type BugResolver interface {
  69	Status(ctx context.Context, obj *bug.Snapshot) (models.Status, error)
  70
  71	Comments(ctx context.Context, obj *bug.Snapshot, input models.ConnectionInput) (models.CommentConnection, error)
  72	Operations(ctx context.Context, obj *bug.Snapshot, input models.ConnectionInput) (models.OperationConnection, error)
  73}
  74type CreateOperationResolver interface {
  75	Date(ctx context.Context, obj *operations.CreateOperation) (time.Time, error)
  76}
  77type LabelChangeOperationResolver interface {
  78	Date(ctx context.Context, obj *operations.LabelChangeOperation) (time.Time, error)
  79}
  80type QueryResolver interface {
  81	DefaultRepository(ctx context.Context) (*models.Repository, error)
  82	Repository(ctx context.Context, id string) (*models.Repository, error)
  83}
  84type RepositoryResolver interface {
  85	AllBugs(ctx context.Context, obj *models.Repository, input models.ConnectionInput) (models.BugConnection, error)
  86	Bug(ctx context.Context, obj *models.Repository, prefix string) (*bug.Snapshot, error)
  87}
  88type SetStatusOperationResolver interface {
  89	Date(ctx context.Context, obj *operations.SetStatusOperation) (time.Time, error)
  90	Status(ctx context.Context, obj *operations.SetStatusOperation) (models.Status, error)
  91}
  92type SetTitleOperationResolver interface {
  93	Date(ctx context.Context, obj *operations.SetTitleOperation) (time.Time, error)
  94}
  95
  96type shortMapper struct {
  97	r ResolverRoot
  98}
  99
 100func (s shortMapper) AddCommentOperation_date(ctx context.Context, obj *operations.AddCommentOperation) (time.Time, error) {
 101	return s.r.AddCommentOperation().Date(ctx, obj)
 102}
 103
 104func (s shortMapper) Bug_status(ctx context.Context, obj *bug.Snapshot) (models.Status, error) {
 105	return s.r.Bug().Status(ctx, obj)
 106}
 107
 108func (s shortMapper) Bug_comments(ctx context.Context, obj *bug.Snapshot, input models.ConnectionInput) (models.CommentConnection, error) {
 109	return s.r.Bug().Comments(ctx, obj, input)
 110}
 111
 112func (s shortMapper) Bug_operations(ctx context.Context, obj *bug.Snapshot, input models.ConnectionInput) (models.OperationConnection, error) {
 113	return s.r.Bug().Operations(ctx, obj, input)
 114}
 115
 116func (s shortMapper) CreateOperation_date(ctx context.Context, obj *operations.CreateOperation) (time.Time, error) {
 117	return s.r.CreateOperation().Date(ctx, obj)
 118}
 119
 120func (s shortMapper) LabelChangeOperation_date(ctx context.Context, obj *operations.LabelChangeOperation) (time.Time, error) {
 121	return s.r.LabelChangeOperation().Date(ctx, obj)
 122}
 123
 124func (s shortMapper) Query_defaultRepository(ctx context.Context) (*models.Repository, error) {
 125	return s.r.Query().DefaultRepository(ctx)
 126}
 127
 128func (s shortMapper) Query_repository(ctx context.Context, id string) (*models.Repository, error) {
 129	return s.r.Query().Repository(ctx, id)
 130}
 131
 132func (s shortMapper) Repository_allBugs(ctx context.Context, obj *models.Repository, input models.ConnectionInput) (models.BugConnection, error) {
 133	return s.r.Repository().AllBugs(ctx, obj, input)
 134}
 135
 136func (s shortMapper) Repository_bug(ctx context.Context, obj *models.Repository, prefix string) (*bug.Snapshot, error) {
 137	return s.r.Repository().Bug(ctx, obj, prefix)
 138}
 139
 140func (s shortMapper) SetStatusOperation_date(ctx context.Context, obj *operations.SetStatusOperation) (time.Time, error) {
 141	return s.r.SetStatusOperation().Date(ctx, obj)
 142}
 143
 144func (s shortMapper) SetStatusOperation_status(ctx context.Context, obj *operations.SetStatusOperation) (models.Status, error) {
 145	return s.r.SetStatusOperation().Status(ctx, obj)
 146}
 147
 148func (s shortMapper) SetTitleOperation_date(ctx context.Context, obj *operations.SetTitleOperation) (time.Time, error) {
 149	return s.r.SetTitleOperation().Date(ctx, obj)
 150}
 151
 152type executableSchema struct {
 153	resolvers Resolvers
 154}
 155
 156func (e *executableSchema) Schema() *schema.Schema {
 157	return parsedSchema
 158}
 159
 160func (e *executableSchema) Query(ctx context.Context, op *query.Operation) *graphql.Response {
 161	ec := executionContext{graphql.GetRequestContext(ctx), e.resolvers}
 162
 163	buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {
 164		data := ec._Query(ctx, op.Selections)
 165		var buf bytes.Buffer
 166		data.MarshalGQL(&buf)
 167		return buf.Bytes()
 168	})
 169
 170	return &graphql.Response{
 171		Data:   buf,
 172		Errors: ec.Errors,
 173	}
 174}
 175
 176func (e *executableSchema) Mutation(ctx context.Context, op *query.Operation) *graphql.Response {
 177	return graphql.ErrorResponse(ctx, "mutations are not supported")
 178}
 179
 180func (e *executableSchema) Subscription(ctx context.Context, op *query.Operation) func() *graphql.Response {
 181	return graphql.OneShot(graphql.ErrorResponse(ctx, "subscriptions are not supported"))
 182}
 183
 184type executionContext struct {
 185	*graphql.RequestContext
 186
 187	resolvers Resolvers
 188}
 189
 190var addCommentOperationImplementors = []string{"AddCommentOperation", "Operation", "Authored"}
 191
 192// nolint: gocyclo, errcheck, gas, goconst
 193func (ec *executionContext) _AddCommentOperation(ctx context.Context, sel []query.Selection, obj *operations.AddCommentOperation) graphql.Marshaler {
 194	fields := graphql.CollectFields(ec.Doc, sel, addCommentOperationImplementors, ec.Variables)
 195
 196	out := graphql.NewOrderedMap(len(fields))
 197	for i, field := range fields {
 198		out.Keys[i] = field.Alias
 199
 200		switch field.Name {
 201		case "__typename":
 202			out.Values[i] = graphql.MarshalString("AddCommentOperation")
 203		case "author":
 204			out.Values[i] = ec._AddCommentOperation_author(ctx, field, obj)
 205		case "date":
 206			out.Values[i] = ec._AddCommentOperation_date(ctx, field, obj)
 207		case "message":
 208			out.Values[i] = ec._AddCommentOperation_message(ctx, field, obj)
 209		default:
 210			panic("unknown field " + strconv.Quote(field.Name))
 211		}
 212	}
 213
 214	return out
 215}
 216
 217func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.AddCommentOperation) graphql.Marshaler {
 218	rctx := graphql.GetResolverContext(ctx)
 219	rctx.Object = "AddCommentOperation"
 220	rctx.Args = nil
 221	rctx.Field = field
 222	rctx.PushField(field.Alias)
 223	defer rctx.Pop()
 224	res := obj.Author
 225	return ec._Person(ctx, field.Selections, &res)
 226}
 227
 228func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.AddCommentOperation) graphql.Marshaler {
 229	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 230		Object: "AddCommentOperation",
 231		Args:   nil,
 232		Field:  field,
 233	})
 234	return graphql.Defer(func() (ret graphql.Marshaler) {
 235		defer func() {
 236			if r := recover(); r != nil {
 237				userErr := ec.Recover(ctx, r)
 238				ec.Error(ctx, userErr)
 239				ret = graphql.Null
 240			}
 241		}()
 242
 243		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 244			return ec.resolvers.AddCommentOperation_date(ctx, obj)
 245		})
 246		if err != nil {
 247			ec.Error(ctx, err)
 248			return graphql.Null
 249		}
 250		if resTmp == nil {
 251			return graphql.Null
 252		}
 253		res := resTmp.(time.Time)
 254		return graphql.MarshalTime(res)
 255	})
 256}
 257
 258func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *operations.AddCommentOperation) graphql.Marshaler {
 259	rctx := graphql.GetResolverContext(ctx)
 260	rctx.Object = "AddCommentOperation"
 261	rctx.Args = nil
 262	rctx.Field = field
 263	rctx.PushField(field.Alias)
 264	defer rctx.Pop()
 265	res := obj.Message
 266	return graphql.MarshalString(res)
 267}
 268
 269var bugImplementors = []string{"Bug"}
 270
 271// nolint: gocyclo, errcheck, gas, goconst
 272func (ec *executionContext) _Bug(ctx context.Context, sel []query.Selection, obj *bug.Snapshot) graphql.Marshaler {
 273	fields := graphql.CollectFields(ec.Doc, sel, bugImplementors, ec.Variables)
 274
 275	out := graphql.NewOrderedMap(len(fields))
 276	for i, field := range fields {
 277		out.Keys[i] = field.Alias
 278
 279		switch field.Name {
 280		case "__typename":
 281			out.Values[i] = graphql.MarshalString("Bug")
 282		case "id":
 283			out.Values[i] = ec._Bug_id(ctx, field, obj)
 284		case "humanId":
 285			out.Values[i] = ec._Bug_humanId(ctx, field, obj)
 286		case "title":
 287			out.Values[i] = ec._Bug_title(ctx, field, obj)
 288		case "status":
 289			out.Values[i] = ec._Bug_status(ctx, field, obj)
 290		case "labels":
 291			out.Values[i] = ec._Bug_labels(ctx, field, obj)
 292		case "comments":
 293			out.Values[i] = ec._Bug_comments(ctx, field, obj)
 294		case "operations":
 295			out.Values[i] = ec._Bug_operations(ctx, field, obj)
 296		default:
 297			panic("unknown field " + strconv.Quote(field.Name))
 298		}
 299	}
 300
 301	return out
 302}
 303
 304func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 305	rctx := graphql.GetResolverContext(ctx)
 306	rctx.Object = "Bug"
 307	rctx.Args = nil
 308	rctx.Field = field
 309	rctx.PushField(field.Alias)
 310	defer rctx.Pop()
 311	res := obj.Id()
 312	return graphql.MarshalString(res)
 313}
 314
 315func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 316	rctx := graphql.GetResolverContext(ctx)
 317	rctx.Object = "Bug"
 318	rctx.Args = nil
 319	rctx.Field = field
 320	rctx.PushField(field.Alias)
 321	defer rctx.Pop()
 322	res := obj.HumanId()
 323	return graphql.MarshalString(res)
 324}
 325
 326func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 327	rctx := graphql.GetResolverContext(ctx)
 328	rctx.Object = "Bug"
 329	rctx.Args = nil
 330	rctx.Field = field
 331	rctx.PushField(field.Alias)
 332	defer rctx.Pop()
 333	res := obj.Title
 334	return graphql.MarshalString(res)
 335}
 336
 337func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 338	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 339		Object: "Bug",
 340		Args:   nil,
 341		Field:  field,
 342	})
 343	return graphql.Defer(func() (ret graphql.Marshaler) {
 344		defer func() {
 345			if r := recover(); r != nil {
 346				userErr := ec.Recover(ctx, r)
 347				ec.Error(ctx, userErr)
 348				ret = graphql.Null
 349			}
 350		}()
 351
 352		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 353			return ec.resolvers.Bug_status(ctx, obj)
 354		})
 355		if err != nil {
 356			ec.Error(ctx, err)
 357			return graphql.Null
 358		}
 359		if resTmp == nil {
 360			return graphql.Null
 361		}
 362		res := resTmp.(models.Status)
 363		return res
 364	})
 365}
 366
 367func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 368	rctx := graphql.GetResolverContext(ctx)
 369	rctx.Object = "Bug"
 370	rctx.Args = nil
 371	rctx.Field = field
 372	rctx.PushField(field.Alias)
 373	defer rctx.Pop()
 374	res := obj.Labels
 375	arr1 := graphql.Array{}
 376	for idx1 := range res {
 377		arr1 = append(arr1, func() graphql.Marshaler {
 378			rctx := graphql.GetResolverContext(ctx)
 379			rctx.PushIndex(idx1)
 380			defer rctx.Pop()
 381			return res[idx1]
 382		}())
 383	}
 384	return arr1
 385}
 386
 387func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 388	args := map[string]interface{}{}
 389	var arg0 models.ConnectionInput
 390	if tmp, ok := field.Args["input"]; ok {
 391		var err error
 392		arg0, err = UnmarshalConnectionInput(tmp)
 393		if err != nil {
 394			ec.Error(ctx, err)
 395			return graphql.Null
 396		}
 397	}
 398	args["input"] = arg0
 399	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 400		Object: "Bug",
 401		Args:   args,
 402		Field:  field,
 403	})
 404	return graphql.Defer(func() (ret graphql.Marshaler) {
 405		defer func() {
 406			if r := recover(); r != nil {
 407				userErr := ec.Recover(ctx, r)
 408				ec.Error(ctx, userErr)
 409				ret = graphql.Null
 410			}
 411		}()
 412
 413		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 414			return ec.resolvers.Bug_comments(ctx, obj, args["input"].(models.ConnectionInput))
 415		})
 416		if err != nil {
 417			ec.Error(ctx, err)
 418			return graphql.Null
 419		}
 420		if resTmp == nil {
 421			return graphql.Null
 422		}
 423		res := resTmp.(models.CommentConnection)
 424		return ec._CommentConnection(ctx, field.Selections, &res)
 425	})
 426}
 427
 428func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 429	args := map[string]interface{}{}
 430	var arg0 models.ConnectionInput
 431	if tmp, ok := field.Args["input"]; ok {
 432		var err error
 433		arg0, err = UnmarshalConnectionInput(tmp)
 434		if err != nil {
 435			ec.Error(ctx, err)
 436			return graphql.Null
 437		}
 438	}
 439	args["input"] = arg0
 440	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 441		Object: "Bug",
 442		Args:   args,
 443		Field:  field,
 444	})
 445	return graphql.Defer(func() (ret graphql.Marshaler) {
 446		defer func() {
 447			if r := recover(); r != nil {
 448				userErr := ec.Recover(ctx, r)
 449				ec.Error(ctx, userErr)
 450				ret = graphql.Null
 451			}
 452		}()
 453
 454		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 455			return ec.resolvers.Bug_operations(ctx, obj, args["input"].(models.ConnectionInput))
 456		})
 457		if err != nil {
 458			ec.Error(ctx, err)
 459			return graphql.Null
 460		}
 461		if resTmp == nil {
 462			return graphql.Null
 463		}
 464		res := resTmp.(models.OperationConnection)
 465		return ec._OperationConnection(ctx, field.Selections, &res)
 466	})
 467}
 468
 469var bugConnectionImplementors = []string{"BugConnection"}
 470
 471// nolint: gocyclo, errcheck, gas, goconst
 472func (ec *executionContext) _BugConnection(ctx context.Context, sel []query.Selection, obj *models.BugConnection) graphql.Marshaler {
 473	fields := graphql.CollectFields(ec.Doc, sel, bugConnectionImplementors, ec.Variables)
 474
 475	out := graphql.NewOrderedMap(len(fields))
 476	for i, field := range fields {
 477		out.Keys[i] = field.Alias
 478
 479		switch field.Name {
 480		case "__typename":
 481			out.Values[i] = graphql.MarshalString("BugConnection")
 482		case "edges":
 483			out.Values[i] = ec._BugConnection_edges(ctx, field, obj)
 484		case "pageInfo":
 485			out.Values[i] = ec._BugConnection_pageInfo(ctx, field, obj)
 486		case "totalCount":
 487			out.Values[i] = ec._BugConnection_totalCount(ctx, field, obj)
 488		default:
 489			panic("unknown field " + strconv.Quote(field.Name))
 490		}
 491	}
 492
 493	return out
 494}
 495
 496func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
 497	rctx := graphql.GetResolverContext(ctx)
 498	rctx.Object = "BugConnection"
 499	rctx.Args = nil
 500	rctx.Field = field
 501	rctx.PushField(field.Alias)
 502	defer rctx.Pop()
 503	res := obj.Edges
 504	arr1 := graphql.Array{}
 505	for idx1 := range res {
 506		arr1 = append(arr1, func() graphql.Marshaler {
 507			rctx := graphql.GetResolverContext(ctx)
 508			rctx.PushIndex(idx1)
 509			defer rctx.Pop()
 510			return ec._BugEdge(ctx, field.Selections, &res[idx1])
 511		}())
 512	}
 513	return arr1
 514}
 515
 516func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
 517	rctx := graphql.GetResolverContext(ctx)
 518	rctx.Object = "BugConnection"
 519	rctx.Args = nil
 520	rctx.Field = field
 521	rctx.PushField(field.Alias)
 522	defer rctx.Pop()
 523	res := obj.PageInfo
 524	return ec._PageInfo(ctx, field.Selections, &res)
 525}
 526
 527func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
 528	rctx := graphql.GetResolverContext(ctx)
 529	rctx.Object = "BugConnection"
 530	rctx.Args = nil
 531	rctx.Field = field
 532	rctx.PushField(field.Alias)
 533	defer rctx.Pop()
 534	res := obj.TotalCount
 535	return graphql.MarshalInt(res)
 536}
 537
 538var bugEdgeImplementors = []string{"BugEdge"}
 539
 540// nolint: gocyclo, errcheck, gas, goconst
 541func (ec *executionContext) _BugEdge(ctx context.Context, sel []query.Selection, obj *models.BugEdge) graphql.Marshaler {
 542	fields := graphql.CollectFields(ec.Doc, sel, bugEdgeImplementors, ec.Variables)
 543
 544	out := graphql.NewOrderedMap(len(fields))
 545	for i, field := range fields {
 546		out.Keys[i] = field.Alias
 547
 548		switch field.Name {
 549		case "__typename":
 550			out.Values[i] = graphql.MarshalString("BugEdge")
 551		case "cursor":
 552			out.Values[i] = ec._BugEdge_cursor(ctx, field, obj)
 553		case "node":
 554			out.Values[i] = ec._BugEdge_node(ctx, field, obj)
 555		default:
 556			panic("unknown field " + strconv.Quote(field.Name))
 557		}
 558	}
 559
 560	return out
 561}
 562
 563func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler {
 564	rctx := graphql.GetResolverContext(ctx)
 565	rctx.Object = "BugEdge"
 566	rctx.Args = nil
 567	rctx.Field = field
 568	rctx.PushField(field.Alias)
 569	defer rctx.Pop()
 570	res := obj.Cursor
 571	return graphql.MarshalString(res)
 572}
 573
 574func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler {
 575	rctx := graphql.GetResolverContext(ctx)
 576	rctx.Object = "BugEdge"
 577	rctx.Args = nil
 578	rctx.Field = field
 579	rctx.PushField(field.Alias)
 580	defer rctx.Pop()
 581	res := obj.Node
 582	return ec._Bug(ctx, field.Selections, &res)
 583}
 584
 585var commentImplementors = []string{"Comment", "Authored"}
 586
 587// nolint: gocyclo, errcheck, gas, goconst
 588func (ec *executionContext) _Comment(ctx context.Context, sel []query.Selection, obj *bug.Comment) graphql.Marshaler {
 589	fields := graphql.CollectFields(ec.Doc, sel, commentImplementors, ec.Variables)
 590
 591	out := graphql.NewOrderedMap(len(fields))
 592	for i, field := range fields {
 593		out.Keys[i] = field.Alias
 594
 595		switch field.Name {
 596		case "__typename":
 597			out.Values[i] = graphql.MarshalString("Comment")
 598		case "author":
 599			out.Values[i] = ec._Comment_author(ctx, field, obj)
 600		case "message":
 601			out.Values[i] = ec._Comment_message(ctx, field, obj)
 602		default:
 603			panic("unknown field " + strconv.Quote(field.Name))
 604		}
 605	}
 606
 607	return out
 608}
 609
 610func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
 611	rctx := graphql.GetResolverContext(ctx)
 612	rctx.Object = "Comment"
 613	rctx.Args = nil
 614	rctx.Field = field
 615	rctx.PushField(field.Alias)
 616	defer rctx.Pop()
 617	res := obj.Author
 618	return ec._Person(ctx, field.Selections, &res)
 619}
 620
 621func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
 622	rctx := graphql.GetResolverContext(ctx)
 623	rctx.Object = "Comment"
 624	rctx.Args = nil
 625	rctx.Field = field
 626	rctx.PushField(field.Alias)
 627	defer rctx.Pop()
 628	res := obj.Message
 629	return graphql.MarshalString(res)
 630}
 631
 632var commentConnectionImplementors = []string{"CommentConnection"}
 633
 634// nolint: gocyclo, errcheck, gas, goconst
 635func (ec *executionContext) _CommentConnection(ctx context.Context, sel []query.Selection, obj *models.CommentConnection) graphql.Marshaler {
 636	fields := graphql.CollectFields(ec.Doc, sel, commentConnectionImplementors, ec.Variables)
 637
 638	out := graphql.NewOrderedMap(len(fields))
 639	for i, field := range fields {
 640		out.Keys[i] = field.Alias
 641
 642		switch field.Name {
 643		case "__typename":
 644			out.Values[i] = graphql.MarshalString("CommentConnection")
 645		case "edges":
 646			out.Values[i] = ec._CommentConnection_edges(ctx, field, obj)
 647		case "pageInfo":
 648			out.Values[i] = ec._CommentConnection_pageInfo(ctx, field, obj)
 649		case "totalCount":
 650			out.Values[i] = ec._CommentConnection_totalCount(ctx, field, obj)
 651		default:
 652			panic("unknown field " + strconv.Quote(field.Name))
 653		}
 654	}
 655
 656	return out
 657}
 658
 659func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
 660	rctx := graphql.GetResolverContext(ctx)
 661	rctx.Object = "CommentConnection"
 662	rctx.Args = nil
 663	rctx.Field = field
 664	rctx.PushField(field.Alias)
 665	defer rctx.Pop()
 666	res := obj.Edges
 667	arr1 := graphql.Array{}
 668	for idx1 := range res {
 669		arr1 = append(arr1, func() graphql.Marshaler {
 670			rctx := graphql.GetResolverContext(ctx)
 671			rctx.PushIndex(idx1)
 672			defer rctx.Pop()
 673			return ec._CommentEdge(ctx, field.Selections, &res[idx1])
 674		}())
 675	}
 676	return arr1
 677}
 678
 679func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
 680	rctx := graphql.GetResolverContext(ctx)
 681	rctx.Object = "CommentConnection"
 682	rctx.Args = nil
 683	rctx.Field = field
 684	rctx.PushField(field.Alias)
 685	defer rctx.Pop()
 686	res := obj.PageInfo
 687	return ec._PageInfo(ctx, field.Selections, &res)
 688}
 689
 690func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
 691	rctx := graphql.GetResolverContext(ctx)
 692	rctx.Object = "CommentConnection"
 693	rctx.Args = nil
 694	rctx.Field = field
 695	rctx.PushField(field.Alias)
 696	defer rctx.Pop()
 697	res := obj.TotalCount
 698	return graphql.MarshalInt(res)
 699}
 700
 701var commentEdgeImplementors = []string{"CommentEdge"}
 702
 703// nolint: gocyclo, errcheck, gas, goconst
 704func (ec *executionContext) _CommentEdge(ctx context.Context, sel []query.Selection, obj *models.CommentEdge) graphql.Marshaler {
 705	fields := graphql.CollectFields(ec.Doc, sel, commentEdgeImplementors, ec.Variables)
 706
 707	out := graphql.NewOrderedMap(len(fields))
 708	for i, field := range fields {
 709		out.Keys[i] = field.Alias
 710
 711		switch field.Name {
 712		case "__typename":
 713			out.Values[i] = graphql.MarshalString("CommentEdge")
 714		case "cursor":
 715			out.Values[i] = ec._CommentEdge_cursor(ctx, field, obj)
 716		case "node":
 717			out.Values[i] = ec._CommentEdge_node(ctx, field, obj)
 718		default:
 719			panic("unknown field " + strconv.Quote(field.Name))
 720		}
 721	}
 722
 723	return out
 724}
 725
 726func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler {
 727	rctx := graphql.GetResolverContext(ctx)
 728	rctx.Object = "CommentEdge"
 729	rctx.Args = nil
 730	rctx.Field = field
 731	rctx.PushField(field.Alias)
 732	defer rctx.Pop()
 733	res := obj.Cursor
 734	return graphql.MarshalString(res)
 735}
 736
 737func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler {
 738	rctx := graphql.GetResolverContext(ctx)
 739	rctx.Object = "CommentEdge"
 740	rctx.Args = nil
 741	rctx.Field = field
 742	rctx.PushField(field.Alias)
 743	defer rctx.Pop()
 744	res := obj.Node
 745	return ec._Comment(ctx, field.Selections, &res)
 746}
 747
 748var createOperationImplementors = []string{"CreateOperation", "Operation", "Authored"}
 749
 750// nolint: gocyclo, errcheck, gas, goconst
 751func (ec *executionContext) _CreateOperation(ctx context.Context, sel []query.Selection, obj *operations.CreateOperation) graphql.Marshaler {
 752	fields := graphql.CollectFields(ec.Doc, sel, createOperationImplementors, ec.Variables)
 753
 754	out := graphql.NewOrderedMap(len(fields))
 755	for i, field := range fields {
 756		out.Keys[i] = field.Alias
 757
 758		switch field.Name {
 759		case "__typename":
 760			out.Values[i] = graphql.MarshalString("CreateOperation")
 761		case "author":
 762			out.Values[i] = ec._CreateOperation_author(ctx, field, obj)
 763		case "date":
 764			out.Values[i] = ec._CreateOperation_date(ctx, field, obj)
 765		case "title":
 766			out.Values[i] = ec._CreateOperation_title(ctx, field, obj)
 767		case "message":
 768			out.Values[i] = ec._CreateOperation_message(ctx, field, obj)
 769		default:
 770			panic("unknown field " + strconv.Quote(field.Name))
 771		}
 772	}
 773
 774	return out
 775}
 776
 777func (ec *executionContext) _CreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.CreateOperation) graphql.Marshaler {
 778	rctx := graphql.GetResolverContext(ctx)
 779	rctx.Object = "CreateOperation"
 780	rctx.Args = nil
 781	rctx.Field = field
 782	rctx.PushField(field.Alias)
 783	defer rctx.Pop()
 784	res := obj.Author
 785	return ec._Person(ctx, field.Selections, &res)
 786}
 787
 788func (ec *executionContext) _CreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.CreateOperation) graphql.Marshaler {
 789	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 790		Object: "CreateOperation",
 791		Args:   nil,
 792		Field:  field,
 793	})
 794	return graphql.Defer(func() (ret graphql.Marshaler) {
 795		defer func() {
 796			if r := recover(); r != nil {
 797				userErr := ec.Recover(ctx, r)
 798				ec.Error(ctx, userErr)
 799				ret = graphql.Null
 800			}
 801		}()
 802
 803		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 804			return ec.resolvers.CreateOperation_date(ctx, obj)
 805		})
 806		if err != nil {
 807			ec.Error(ctx, err)
 808			return graphql.Null
 809		}
 810		if resTmp == nil {
 811			return graphql.Null
 812		}
 813		res := resTmp.(time.Time)
 814		return graphql.MarshalTime(res)
 815	})
 816}
 817
 818func (ec *executionContext) _CreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *operations.CreateOperation) graphql.Marshaler {
 819	rctx := graphql.GetResolverContext(ctx)
 820	rctx.Object = "CreateOperation"
 821	rctx.Args = nil
 822	rctx.Field = field
 823	rctx.PushField(field.Alias)
 824	defer rctx.Pop()
 825	res := obj.Title
 826	return graphql.MarshalString(res)
 827}
 828
 829func (ec *executionContext) _CreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *operations.CreateOperation) graphql.Marshaler {
 830	rctx := graphql.GetResolverContext(ctx)
 831	rctx.Object = "CreateOperation"
 832	rctx.Args = nil
 833	rctx.Field = field
 834	rctx.PushField(field.Alias)
 835	defer rctx.Pop()
 836	res := obj.Message
 837	return graphql.MarshalString(res)
 838}
 839
 840var labelChangeOperationImplementors = []string{"LabelChangeOperation", "Operation", "Authored"}
 841
 842// nolint: gocyclo, errcheck, gas, goconst
 843func (ec *executionContext) _LabelChangeOperation(ctx context.Context, sel []query.Selection, obj *operations.LabelChangeOperation) graphql.Marshaler {
 844	fields := graphql.CollectFields(ec.Doc, sel, labelChangeOperationImplementors, ec.Variables)
 845
 846	out := graphql.NewOrderedMap(len(fields))
 847	for i, field := range fields {
 848		out.Keys[i] = field.Alias
 849
 850		switch field.Name {
 851		case "__typename":
 852			out.Values[i] = graphql.MarshalString("LabelChangeOperation")
 853		case "author":
 854			out.Values[i] = ec._LabelChangeOperation_author(ctx, field, obj)
 855		case "date":
 856			out.Values[i] = ec._LabelChangeOperation_date(ctx, field, obj)
 857		case "added":
 858			out.Values[i] = ec._LabelChangeOperation_added(ctx, field, obj)
 859		case "removed":
 860			out.Values[i] = ec._LabelChangeOperation_removed(ctx, field, obj)
 861		default:
 862			panic("unknown field " + strconv.Quote(field.Name))
 863		}
 864	}
 865
 866	return out
 867}
 868
 869func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.LabelChangeOperation) graphql.Marshaler {
 870	rctx := graphql.GetResolverContext(ctx)
 871	rctx.Object = "LabelChangeOperation"
 872	rctx.Args = nil
 873	rctx.Field = field
 874	rctx.PushField(field.Alias)
 875	defer rctx.Pop()
 876	res := obj.Author
 877	return ec._Person(ctx, field.Selections, &res)
 878}
 879
 880func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.LabelChangeOperation) graphql.Marshaler {
 881	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 882		Object: "LabelChangeOperation",
 883		Args:   nil,
 884		Field:  field,
 885	})
 886	return graphql.Defer(func() (ret graphql.Marshaler) {
 887		defer func() {
 888			if r := recover(); r != nil {
 889				userErr := ec.Recover(ctx, r)
 890				ec.Error(ctx, userErr)
 891				ret = graphql.Null
 892			}
 893		}()
 894
 895		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 896			return ec.resolvers.LabelChangeOperation_date(ctx, obj)
 897		})
 898		if err != nil {
 899			ec.Error(ctx, err)
 900			return graphql.Null
 901		}
 902		if resTmp == nil {
 903			return graphql.Null
 904		}
 905		res := resTmp.(time.Time)
 906		return graphql.MarshalTime(res)
 907	})
 908}
 909
 910func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField, obj *operations.LabelChangeOperation) graphql.Marshaler {
 911	rctx := graphql.GetResolverContext(ctx)
 912	rctx.Object = "LabelChangeOperation"
 913	rctx.Args = nil
 914	rctx.Field = field
 915	rctx.PushField(field.Alias)
 916	defer rctx.Pop()
 917	res := obj.Added
 918	arr1 := graphql.Array{}
 919	for idx1 := range res {
 920		arr1 = append(arr1, func() graphql.Marshaler {
 921			rctx := graphql.GetResolverContext(ctx)
 922			rctx.PushIndex(idx1)
 923			defer rctx.Pop()
 924			return res[idx1]
 925		}())
 926	}
 927	return arr1
 928}
 929
 930func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *operations.LabelChangeOperation) graphql.Marshaler {
 931	rctx := graphql.GetResolverContext(ctx)
 932	rctx.Object = "LabelChangeOperation"
 933	rctx.Args = nil
 934	rctx.Field = field
 935	rctx.PushField(field.Alias)
 936	defer rctx.Pop()
 937	res := obj.Removed
 938	arr1 := graphql.Array{}
 939	for idx1 := range res {
 940		arr1 = append(arr1, func() graphql.Marshaler {
 941			rctx := graphql.GetResolverContext(ctx)
 942			rctx.PushIndex(idx1)
 943			defer rctx.Pop()
 944			return res[idx1]
 945		}())
 946	}
 947	return arr1
 948}
 949
 950var operationConnectionImplementors = []string{"OperationConnection"}
 951
 952// nolint: gocyclo, errcheck, gas, goconst
 953func (ec *executionContext) _OperationConnection(ctx context.Context, sel []query.Selection, obj *models.OperationConnection) graphql.Marshaler {
 954	fields := graphql.CollectFields(ec.Doc, sel, operationConnectionImplementors, ec.Variables)
 955
 956	out := graphql.NewOrderedMap(len(fields))
 957	for i, field := range fields {
 958		out.Keys[i] = field.Alias
 959
 960		switch field.Name {
 961		case "__typename":
 962			out.Values[i] = graphql.MarshalString("OperationConnection")
 963		case "edges":
 964			out.Values[i] = ec._OperationConnection_edges(ctx, field, obj)
 965		case "pageInfo":
 966			out.Values[i] = ec._OperationConnection_pageInfo(ctx, field, obj)
 967		case "totalCount":
 968			out.Values[i] = ec._OperationConnection_totalCount(ctx, field, obj)
 969		default:
 970			panic("unknown field " + strconv.Quote(field.Name))
 971		}
 972	}
 973
 974	return out
 975}
 976
 977func (ec *executionContext) _OperationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
 978	rctx := graphql.GetResolverContext(ctx)
 979	rctx.Object = "OperationConnection"
 980	rctx.Args = nil
 981	rctx.Field = field
 982	rctx.PushField(field.Alias)
 983	defer rctx.Pop()
 984	res := obj.Edges
 985	arr1 := graphql.Array{}
 986	for idx1 := range res {
 987		arr1 = append(arr1, func() graphql.Marshaler {
 988			rctx := graphql.GetResolverContext(ctx)
 989			rctx.PushIndex(idx1)
 990			defer rctx.Pop()
 991			return ec._OperationEdge(ctx, field.Selections, &res[idx1])
 992		}())
 993	}
 994	return arr1
 995}
 996
 997func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
 998	rctx := graphql.GetResolverContext(ctx)
 999	rctx.Object = "OperationConnection"
1000	rctx.Args = nil
1001	rctx.Field = field
1002	rctx.PushField(field.Alias)
1003	defer rctx.Pop()
1004	res := obj.PageInfo
1005	return ec._PageInfo(ctx, field.Selections, &res)
1006}
1007
1008func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
1009	rctx := graphql.GetResolverContext(ctx)
1010	rctx.Object = "OperationConnection"
1011	rctx.Args = nil
1012	rctx.Field = field
1013	rctx.PushField(field.Alias)
1014	defer rctx.Pop()
1015	res := obj.TotalCount
1016	return graphql.MarshalInt(res)
1017}
1018
1019var operationEdgeImplementors = []string{"OperationEdge"}
1020
1021// nolint: gocyclo, errcheck, gas, goconst
1022func (ec *executionContext) _OperationEdge(ctx context.Context, sel []query.Selection, obj *models.OperationEdge) graphql.Marshaler {
1023	fields := graphql.CollectFields(ec.Doc, sel, operationEdgeImplementors, ec.Variables)
1024
1025	out := graphql.NewOrderedMap(len(fields))
1026	for i, field := range fields {
1027		out.Keys[i] = field.Alias
1028
1029		switch field.Name {
1030		case "__typename":
1031			out.Values[i] = graphql.MarshalString("OperationEdge")
1032		case "cursor":
1033			out.Values[i] = ec._OperationEdge_cursor(ctx, field, obj)
1034		case "node":
1035			out.Values[i] = ec._OperationEdge_node(ctx, field, obj)
1036		default:
1037			panic("unknown field " + strconv.Quote(field.Name))
1038		}
1039	}
1040
1041	return out
1042}
1043
1044func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler {
1045	rctx := graphql.GetResolverContext(ctx)
1046	rctx.Object = "OperationEdge"
1047	rctx.Args = nil
1048	rctx.Field = field
1049	rctx.PushField(field.Alias)
1050	defer rctx.Pop()
1051	res := obj.Cursor
1052	return graphql.MarshalString(res)
1053}
1054
1055func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler {
1056	rctx := graphql.GetResolverContext(ctx)
1057	rctx.Object = "OperationEdge"
1058	rctx.Args = nil
1059	rctx.Field = field
1060	rctx.PushField(field.Alias)
1061	defer rctx.Pop()
1062	res := obj.Node
1063	return ec._OperationUnion(ctx, field.Selections, &res)
1064}
1065
1066var pageInfoImplementors = []string{"PageInfo"}
1067
1068// nolint: gocyclo, errcheck, gas, goconst
1069func (ec *executionContext) _PageInfo(ctx context.Context, sel []query.Selection, obj *models.PageInfo) graphql.Marshaler {
1070	fields := graphql.CollectFields(ec.Doc, sel, pageInfoImplementors, ec.Variables)
1071
1072	out := graphql.NewOrderedMap(len(fields))
1073	for i, field := range fields {
1074		out.Keys[i] = field.Alias
1075
1076		switch field.Name {
1077		case "__typename":
1078			out.Values[i] = graphql.MarshalString("PageInfo")
1079		case "hasNextPage":
1080			out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj)
1081		case "hasPreviousPage":
1082			out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj)
1083		default:
1084			panic("unknown field " + strconv.Quote(field.Name))
1085		}
1086	}
1087
1088	return out
1089}
1090
1091func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
1092	rctx := graphql.GetResolverContext(ctx)
1093	rctx.Object = "PageInfo"
1094	rctx.Args = nil
1095	rctx.Field = field
1096	rctx.PushField(field.Alias)
1097	defer rctx.Pop()
1098	res := obj.HasNextPage
1099	return graphql.MarshalBoolean(res)
1100}
1101
1102func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
1103	rctx := graphql.GetResolverContext(ctx)
1104	rctx.Object = "PageInfo"
1105	rctx.Args = nil
1106	rctx.Field = field
1107	rctx.PushField(field.Alias)
1108	defer rctx.Pop()
1109	res := obj.HasPreviousPage
1110	return graphql.MarshalBoolean(res)
1111}
1112
1113var personImplementors = []string{"Person"}
1114
1115// nolint: gocyclo, errcheck, gas, goconst
1116func (ec *executionContext) _Person(ctx context.Context, sel []query.Selection, obj *bug.Person) graphql.Marshaler {
1117	fields := graphql.CollectFields(ec.Doc, sel, personImplementors, ec.Variables)
1118
1119	out := graphql.NewOrderedMap(len(fields))
1120	for i, field := range fields {
1121		out.Keys[i] = field.Alias
1122
1123		switch field.Name {
1124		case "__typename":
1125			out.Values[i] = graphql.MarshalString("Person")
1126		case "email":
1127			out.Values[i] = ec._Person_email(ctx, field, obj)
1128		case "name":
1129			out.Values[i] = ec._Person_name(ctx, field, obj)
1130		default:
1131			panic("unknown field " + strconv.Quote(field.Name))
1132		}
1133	}
1134
1135	return out
1136}
1137
1138func (ec *executionContext) _Person_email(ctx context.Context, field graphql.CollectedField, obj *bug.Person) graphql.Marshaler {
1139	rctx := graphql.GetResolverContext(ctx)
1140	rctx.Object = "Person"
1141	rctx.Args = nil
1142	rctx.Field = field
1143	rctx.PushField(field.Alias)
1144	defer rctx.Pop()
1145	res := obj.Email
1146	return graphql.MarshalString(res)
1147}
1148
1149func (ec *executionContext) _Person_name(ctx context.Context, field graphql.CollectedField, obj *bug.Person) graphql.Marshaler {
1150	rctx := graphql.GetResolverContext(ctx)
1151	rctx.Object = "Person"
1152	rctx.Args = nil
1153	rctx.Field = field
1154	rctx.PushField(field.Alias)
1155	defer rctx.Pop()
1156	res := obj.Name
1157	return graphql.MarshalString(res)
1158}
1159
1160var queryImplementors = []string{"Query"}
1161
1162// nolint: gocyclo, errcheck, gas, goconst
1163func (ec *executionContext) _Query(ctx context.Context, sel []query.Selection) graphql.Marshaler {
1164	fields := graphql.CollectFields(ec.Doc, sel, queryImplementors, ec.Variables)
1165
1166	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1167		Object: "Query",
1168	})
1169
1170	out := graphql.NewOrderedMap(len(fields))
1171	for i, field := range fields {
1172		out.Keys[i] = field.Alias
1173
1174		switch field.Name {
1175		case "__typename":
1176			out.Values[i] = graphql.MarshalString("Query")
1177		case "defaultRepository":
1178			out.Values[i] = ec._Query_defaultRepository(ctx, field)
1179		case "repository":
1180			out.Values[i] = ec._Query_repository(ctx, field)
1181		case "__schema":
1182			out.Values[i] = ec._Query___schema(ctx, field)
1183		case "__type":
1184			out.Values[i] = ec._Query___type(ctx, field)
1185		default:
1186			panic("unknown field " + strconv.Quote(field.Name))
1187		}
1188	}
1189
1190	return out
1191}
1192
1193func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1194	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1195		Object: "Query",
1196		Args:   nil,
1197		Field:  field,
1198	})
1199	return graphql.Defer(func() (ret graphql.Marshaler) {
1200		defer func() {
1201			if r := recover(); r != nil {
1202				userErr := ec.Recover(ctx, r)
1203				ec.Error(ctx, userErr)
1204				ret = graphql.Null
1205			}
1206		}()
1207
1208		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1209			return ec.resolvers.Query_defaultRepository(ctx)
1210		})
1211		if err != nil {
1212			ec.Error(ctx, err)
1213			return graphql.Null
1214		}
1215		if resTmp == nil {
1216			return graphql.Null
1217		}
1218		res := resTmp.(*models.Repository)
1219		if res == nil {
1220			return graphql.Null
1221		}
1222		return ec._Repository(ctx, field.Selections, res)
1223	})
1224}
1225
1226func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1227	args := map[string]interface{}{}
1228	var arg0 string
1229	if tmp, ok := field.Args["id"]; ok {
1230		var err error
1231		arg0, err = graphql.UnmarshalString(tmp)
1232		if err != nil {
1233			ec.Error(ctx, err)
1234			return graphql.Null
1235		}
1236	}
1237	args["id"] = arg0
1238	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1239		Object: "Query",
1240		Args:   args,
1241		Field:  field,
1242	})
1243	return graphql.Defer(func() (ret graphql.Marshaler) {
1244		defer func() {
1245			if r := recover(); r != nil {
1246				userErr := ec.Recover(ctx, r)
1247				ec.Error(ctx, userErr)
1248				ret = graphql.Null
1249			}
1250		}()
1251
1252		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1253			return ec.resolvers.Query_repository(ctx, args["id"].(string))
1254		})
1255		if err != nil {
1256			ec.Error(ctx, err)
1257			return graphql.Null
1258		}
1259		if resTmp == nil {
1260			return graphql.Null
1261		}
1262		res := resTmp.(*models.Repository)
1263		if res == nil {
1264			return graphql.Null
1265		}
1266		return ec._Repository(ctx, field.Selections, res)
1267	})
1268}
1269
1270func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1271	rctx := graphql.GetResolverContext(ctx)
1272	rctx.Object = "Query"
1273	rctx.Args = nil
1274	rctx.Field = field
1275	rctx.PushField(field.Alias)
1276	defer rctx.Pop()
1277	res := ec.introspectSchema()
1278	if res == nil {
1279		return graphql.Null
1280	}
1281	return ec.___Schema(ctx, field.Selections, res)
1282}
1283
1284func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1285	args := map[string]interface{}{}
1286	var arg0 string
1287	if tmp, ok := field.Args["name"]; ok {
1288		var err error
1289		arg0, err = graphql.UnmarshalString(tmp)
1290		if err != nil {
1291			ec.Error(ctx, err)
1292			return graphql.Null
1293		}
1294	}
1295	args["name"] = arg0
1296	rctx := graphql.GetResolverContext(ctx)
1297	rctx.Object = "Query"
1298	rctx.Args = args
1299	rctx.Field = field
1300	rctx.PushField(field.Alias)
1301	defer rctx.Pop()
1302	res := ec.introspectType(args["name"].(string))
1303	if res == nil {
1304		return graphql.Null
1305	}
1306	return ec.___Type(ctx, field.Selections, res)
1307}
1308
1309var repositoryImplementors = []string{"Repository"}
1310
1311// nolint: gocyclo, errcheck, gas, goconst
1312func (ec *executionContext) _Repository(ctx context.Context, sel []query.Selection, obj *models.Repository) graphql.Marshaler {
1313	fields := graphql.CollectFields(ec.Doc, sel, repositoryImplementors, ec.Variables)
1314
1315	out := graphql.NewOrderedMap(len(fields))
1316	for i, field := range fields {
1317		out.Keys[i] = field.Alias
1318
1319		switch field.Name {
1320		case "__typename":
1321			out.Values[i] = graphql.MarshalString("Repository")
1322		case "allBugs":
1323			out.Values[i] = ec._Repository_allBugs(ctx, field, obj)
1324		case "bug":
1325			out.Values[i] = ec._Repository_bug(ctx, field, obj)
1326		default:
1327			panic("unknown field " + strconv.Quote(field.Name))
1328		}
1329	}
1330
1331	return out
1332}
1333
1334func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
1335	args := map[string]interface{}{}
1336	var arg0 models.ConnectionInput
1337	if tmp, ok := field.Args["input"]; ok {
1338		var err error
1339		arg0, err = UnmarshalConnectionInput(tmp)
1340		if err != nil {
1341			ec.Error(ctx, err)
1342			return graphql.Null
1343		}
1344	}
1345	args["input"] = arg0
1346	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1347		Object: "Repository",
1348		Args:   args,
1349		Field:  field,
1350	})
1351	return graphql.Defer(func() (ret graphql.Marshaler) {
1352		defer func() {
1353			if r := recover(); r != nil {
1354				userErr := ec.Recover(ctx, r)
1355				ec.Error(ctx, userErr)
1356				ret = graphql.Null
1357			}
1358		}()
1359
1360		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1361			return ec.resolvers.Repository_allBugs(ctx, obj, args["input"].(models.ConnectionInput))
1362		})
1363		if err != nil {
1364			ec.Error(ctx, err)
1365			return graphql.Null
1366		}
1367		if resTmp == nil {
1368			return graphql.Null
1369		}
1370		res := resTmp.(models.BugConnection)
1371		return ec._BugConnection(ctx, field.Selections, &res)
1372	})
1373}
1374
1375func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
1376	args := map[string]interface{}{}
1377	var arg0 string
1378	if tmp, ok := field.Args["prefix"]; ok {
1379		var err error
1380		arg0, err = graphql.UnmarshalString(tmp)
1381		if err != nil {
1382			ec.Error(ctx, err)
1383			return graphql.Null
1384		}
1385	}
1386	args["prefix"] = arg0
1387	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1388		Object: "Repository",
1389		Args:   args,
1390		Field:  field,
1391	})
1392	return graphql.Defer(func() (ret graphql.Marshaler) {
1393		defer func() {
1394			if r := recover(); r != nil {
1395				userErr := ec.Recover(ctx, r)
1396				ec.Error(ctx, userErr)
1397				ret = graphql.Null
1398			}
1399		}()
1400
1401		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1402			return ec.resolvers.Repository_bug(ctx, obj, args["prefix"].(string))
1403		})
1404		if err != nil {
1405			ec.Error(ctx, err)
1406			return graphql.Null
1407		}
1408		if resTmp == nil {
1409			return graphql.Null
1410		}
1411		res := resTmp.(*bug.Snapshot)
1412		if res == nil {
1413			return graphql.Null
1414		}
1415		return ec._Bug(ctx, field.Selections, res)
1416	})
1417}
1418
1419var setStatusOperationImplementors = []string{"SetStatusOperation", "Operation", "Authored"}
1420
1421// nolint: gocyclo, errcheck, gas, goconst
1422func (ec *executionContext) _SetStatusOperation(ctx context.Context, sel []query.Selection, obj *operations.SetStatusOperation) graphql.Marshaler {
1423	fields := graphql.CollectFields(ec.Doc, sel, setStatusOperationImplementors, ec.Variables)
1424
1425	out := graphql.NewOrderedMap(len(fields))
1426	for i, field := range fields {
1427		out.Keys[i] = field.Alias
1428
1429		switch field.Name {
1430		case "__typename":
1431			out.Values[i] = graphql.MarshalString("SetStatusOperation")
1432		case "author":
1433			out.Values[i] = ec._SetStatusOperation_author(ctx, field, obj)
1434		case "date":
1435			out.Values[i] = ec._SetStatusOperation_date(ctx, field, obj)
1436		case "status":
1437			out.Values[i] = ec._SetStatusOperation_status(ctx, field, obj)
1438		default:
1439			panic("unknown field " + strconv.Quote(field.Name))
1440		}
1441	}
1442
1443	return out
1444}
1445
1446func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.SetStatusOperation) graphql.Marshaler {
1447	rctx := graphql.GetResolverContext(ctx)
1448	rctx.Object = "SetStatusOperation"
1449	rctx.Args = nil
1450	rctx.Field = field
1451	rctx.PushField(field.Alias)
1452	defer rctx.Pop()
1453	res := obj.Author
1454	return ec._Person(ctx, field.Selections, &res)
1455}
1456
1457func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.SetStatusOperation) graphql.Marshaler {
1458	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1459		Object: "SetStatusOperation",
1460		Args:   nil,
1461		Field:  field,
1462	})
1463	return graphql.Defer(func() (ret graphql.Marshaler) {
1464		defer func() {
1465			if r := recover(); r != nil {
1466				userErr := ec.Recover(ctx, r)
1467				ec.Error(ctx, userErr)
1468				ret = graphql.Null
1469			}
1470		}()
1471
1472		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1473			return ec.resolvers.SetStatusOperation_date(ctx, obj)
1474		})
1475		if err != nil {
1476			ec.Error(ctx, err)
1477			return graphql.Null
1478		}
1479		if resTmp == nil {
1480			return graphql.Null
1481		}
1482		res := resTmp.(time.Time)
1483		return graphql.MarshalTime(res)
1484	})
1485}
1486
1487func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *operations.SetStatusOperation) graphql.Marshaler {
1488	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1489		Object: "SetStatusOperation",
1490		Args:   nil,
1491		Field:  field,
1492	})
1493	return graphql.Defer(func() (ret graphql.Marshaler) {
1494		defer func() {
1495			if r := recover(); r != nil {
1496				userErr := ec.Recover(ctx, r)
1497				ec.Error(ctx, userErr)
1498				ret = graphql.Null
1499			}
1500		}()
1501
1502		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1503			return ec.resolvers.SetStatusOperation_status(ctx, obj)
1504		})
1505		if err != nil {
1506			ec.Error(ctx, err)
1507			return graphql.Null
1508		}
1509		if resTmp == nil {
1510			return graphql.Null
1511		}
1512		res := resTmp.(models.Status)
1513		return res
1514	})
1515}
1516
1517var setTitleOperationImplementors = []string{"SetTitleOperation", "Operation", "Authored"}
1518
1519// nolint: gocyclo, errcheck, gas, goconst
1520func (ec *executionContext) _SetTitleOperation(ctx context.Context, sel []query.Selection, obj *operations.SetTitleOperation) graphql.Marshaler {
1521	fields := graphql.CollectFields(ec.Doc, sel, setTitleOperationImplementors, ec.Variables)
1522
1523	out := graphql.NewOrderedMap(len(fields))
1524	for i, field := range fields {
1525		out.Keys[i] = field.Alias
1526
1527		switch field.Name {
1528		case "__typename":
1529			out.Values[i] = graphql.MarshalString("SetTitleOperation")
1530		case "author":
1531			out.Values[i] = ec._SetTitleOperation_author(ctx, field, obj)
1532		case "date":
1533			out.Values[i] = ec._SetTitleOperation_date(ctx, field, obj)
1534		case "title":
1535			out.Values[i] = ec._SetTitleOperation_title(ctx, field, obj)
1536		default:
1537			panic("unknown field " + strconv.Quote(field.Name))
1538		}
1539	}
1540
1541	return out
1542}
1543
1544func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.SetTitleOperation) graphql.Marshaler {
1545	rctx := graphql.GetResolverContext(ctx)
1546	rctx.Object = "SetTitleOperation"
1547	rctx.Args = nil
1548	rctx.Field = field
1549	rctx.PushField(field.Alias)
1550	defer rctx.Pop()
1551	res := obj.Author
1552	return ec._Person(ctx, field.Selections, &res)
1553}
1554
1555func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.SetTitleOperation) graphql.Marshaler {
1556	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1557		Object: "SetTitleOperation",
1558		Args:   nil,
1559		Field:  field,
1560	})
1561	return graphql.Defer(func() (ret graphql.Marshaler) {
1562		defer func() {
1563			if r := recover(); r != nil {
1564				userErr := ec.Recover(ctx, r)
1565				ec.Error(ctx, userErr)
1566				ret = graphql.Null
1567			}
1568		}()
1569
1570		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1571			return ec.resolvers.SetTitleOperation_date(ctx, obj)
1572		})
1573		if err != nil {
1574			ec.Error(ctx, err)
1575			return graphql.Null
1576		}
1577		if resTmp == nil {
1578			return graphql.Null
1579		}
1580		res := resTmp.(time.Time)
1581		return graphql.MarshalTime(res)
1582	})
1583}
1584
1585func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *operations.SetTitleOperation) graphql.Marshaler {
1586	rctx := graphql.GetResolverContext(ctx)
1587	rctx.Object = "SetTitleOperation"
1588	rctx.Args = nil
1589	rctx.Field = field
1590	rctx.PushField(field.Alias)
1591	defer rctx.Pop()
1592	res := obj.Title
1593	return graphql.MarshalString(res)
1594}
1595
1596var __DirectiveImplementors = []string{"__Directive"}
1597
1598// nolint: gocyclo, errcheck, gas, goconst
1599func (ec *executionContext) ___Directive(ctx context.Context, sel []query.Selection, obj *introspection.Directive) graphql.Marshaler {
1600	fields := graphql.CollectFields(ec.Doc, sel, __DirectiveImplementors, ec.Variables)
1601
1602	out := graphql.NewOrderedMap(len(fields))
1603	for i, field := range fields {
1604		out.Keys[i] = field.Alias
1605
1606		switch field.Name {
1607		case "__typename":
1608			out.Values[i] = graphql.MarshalString("__Directive")
1609		case "name":
1610			out.Values[i] = ec.___Directive_name(ctx, field, obj)
1611		case "description":
1612			out.Values[i] = ec.___Directive_description(ctx, field, obj)
1613		case "locations":
1614			out.Values[i] = ec.___Directive_locations(ctx, field, obj)
1615		case "args":
1616			out.Values[i] = ec.___Directive_args(ctx, field, obj)
1617		default:
1618			panic("unknown field " + strconv.Quote(field.Name))
1619		}
1620	}
1621
1622	return out
1623}
1624
1625func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
1626	rctx := graphql.GetResolverContext(ctx)
1627	rctx.Object = "__Directive"
1628	rctx.Args = nil
1629	rctx.Field = field
1630	rctx.PushField(field.Alias)
1631	defer rctx.Pop()
1632	res := obj.Name()
1633	return graphql.MarshalString(res)
1634}
1635
1636func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
1637	rctx := graphql.GetResolverContext(ctx)
1638	rctx.Object = "__Directive"
1639	rctx.Args = nil
1640	rctx.Field = field
1641	rctx.PushField(field.Alias)
1642	defer rctx.Pop()
1643	res := obj.Description()
1644	if res == nil {
1645		return graphql.Null
1646	}
1647	return graphql.MarshalString(*res)
1648}
1649
1650func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
1651	rctx := graphql.GetResolverContext(ctx)
1652	rctx.Object = "__Directive"
1653	rctx.Args = nil
1654	rctx.Field = field
1655	rctx.PushField(field.Alias)
1656	defer rctx.Pop()
1657	res := obj.Locations()
1658	arr1 := graphql.Array{}
1659	for idx1 := range res {
1660		arr1 = append(arr1, func() graphql.Marshaler {
1661			rctx := graphql.GetResolverContext(ctx)
1662			rctx.PushIndex(idx1)
1663			defer rctx.Pop()
1664			return graphql.MarshalString(res[idx1])
1665		}())
1666	}
1667	return arr1
1668}
1669
1670func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
1671	rctx := graphql.GetResolverContext(ctx)
1672	rctx.Object = "__Directive"
1673	rctx.Args = nil
1674	rctx.Field = field
1675	rctx.PushField(field.Alias)
1676	defer rctx.Pop()
1677	res := obj.Args()
1678	arr1 := graphql.Array{}
1679	for idx1 := range res {
1680		arr1 = append(arr1, func() graphql.Marshaler {
1681			rctx := graphql.GetResolverContext(ctx)
1682			rctx.PushIndex(idx1)
1683			defer rctx.Pop()
1684			return ec.___InputValue(ctx, field.Selections, &res[idx1])
1685		}())
1686	}
1687	return arr1
1688}
1689
1690var __EnumValueImplementors = []string{"__EnumValue"}
1691
1692// nolint: gocyclo, errcheck, gas, goconst
1693func (ec *executionContext) ___EnumValue(ctx context.Context, sel []query.Selection, obj *introspection.EnumValue) graphql.Marshaler {
1694	fields := graphql.CollectFields(ec.Doc, sel, __EnumValueImplementors, ec.Variables)
1695
1696	out := graphql.NewOrderedMap(len(fields))
1697	for i, field := range fields {
1698		out.Keys[i] = field.Alias
1699
1700		switch field.Name {
1701		case "__typename":
1702			out.Values[i] = graphql.MarshalString("__EnumValue")
1703		case "name":
1704			out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
1705		case "description":
1706			out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
1707		case "isDeprecated":
1708			out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
1709		case "deprecationReason":
1710			out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
1711		default:
1712			panic("unknown field " + strconv.Quote(field.Name))
1713		}
1714	}
1715
1716	return out
1717}
1718
1719func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
1720	rctx := graphql.GetResolverContext(ctx)
1721	rctx.Object = "__EnumValue"
1722	rctx.Args = nil
1723	rctx.Field = field
1724	rctx.PushField(field.Alias)
1725	defer rctx.Pop()
1726	res := obj.Name()
1727	return graphql.MarshalString(res)
1728}
1729
1730func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
1731	rctx := graphql.GetResolverContext(ctx)
1732	rctx.Object = "__EnumValue"
1733	rctx.Args = nil
1734	rctx.Field = field
1735	rctx.PushField(field.Alias)
1736	defer rctx.Pop()
1737	res := obj.Description()
1738	if res == nil {
1739		return graphql.Null
1740	}
1741	return graphql.MarshalString(*res)
1742}
1743
1744func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
1745	rctx := graphql.GetResolverContext(ctx)
1746	rctx.Object = "__EnumValue"
1747	rctx.Args = nil
1748	rctx.Field = field
1749	rctx.PushField(field.Alias)
1750	defer rctx.Pop()
1751	res := obj.IsDeprecated()
1752	return graphql.MarshalBoolean(res)
1753}
1754
1755func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
1756	rctx := graphql.GetResolverContext(ctx)
1757	rctx.Object = "__EnumValue"
1758	rctx.Args = nil
1759	rctx.Field = field
1760	rctx.PushField(field.Alias)
1761	defer rctx.Pop()
1762	res := obj.DeprecationReason()
1763	if res == nil {
1764		return graphql.Null
1765	}
1766	return graphql.MarshalString(*res)
1767}
1768
1769var __FieldImplementors = []string{"__Field"}
1770
1771// nolint: gocyclo, errcheck, gas, goconst
1772func (ec *executionContext) ___Field(ctx context.Context, sel []query.Selection, obj *introspection.Field) graphql.Marshaler {
1773	fields := graphql.CollectFields(ec.Doc, sel, __FieldImplementors, ec.Variables)
1774
1775	out := graphql.NewOrderedMap(len(fields))
1776	for i, field := range fields {
1777		out.Keys[i] = field.Alias
1778
1779		switch field.Name {
1780		case "__typename":
1781			out.Values[i] = graphql.MarshalString("__Field")
1782		case "name":
1783			out.Values[i] = ec.___Field_name(ctx, field, obj)
1784		case "description":
1785			out.Values[i] = ec.___Field_description(ctx, field, obj)
1786		case "args":
1787			out.Values[i] = ec.___Field_args(ctx, field, obj)
1788		case "type":
1789			out.Values[i] = ec.___Field_type(ctx, field, obj)
1790		case "isDeprecated":
1791			out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
1792		case "deprecationReason":
1793			out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
1794		default:
1795			panic("unknown field " + strconv.Quote(field.Name))
1796		}
1797	}
1798
1799	return out
1800}
1801
1802func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
1803	rctx := graphql.GetResolverContext(ctx)
1804	rctx.Object = "__Field"
1805	rctx.Args = nil
1806	rctx.Field = field
1807	rctx.PushField(field.Alias)
1808	defer rctx.Pop()
1809	res := obj.Name()
1810	return graphql.MarshalString(res)
1811}
1812
1813func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
1814	rctx := graphql.GetResolverContext(ctx)
1815	rctx.Object = "__Field"
1816	rctx.Args = nil
1817	rctx.Field = field
1818	rctx.PushField(field.Alias)
1819	defer rctx.Pop()
1820	res := obj.Description()
1821	if res == nil {
1822		return graphql.Null
1823	}
1824	return graphql.MarshalString(*res)
1825}
1826
1827func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
1828	rctx := graphql.GetResolverContext(ctx)
1829	rctx.Object = "__Field"
1830	rctx.Args = nil
1831	rctx.Field = field
1832	rctx.PushField(field.Alias)
1833	defer rctx.Pop()
1834	res := obj.Args()
1835	arr1 := graphql.Array{}
1836	for idx1 := range res {
1837		arr1 = append(arr1, func() graphql.Marshaler {
1838			rctx := graphql.GetResolverContext(ctx)
1839			rctx.PushIndex(idx1)
1840			defer rctx.Pop()
1841			return ec.___InputValue(ctx, field.Selections, &res[idx1])
1842		}())
1843	}
1844	return arr1
1845}
1846
1847func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
1848	rctx := graphql.GetResolverContext(ctx)
1849	rctx.Object = "__Field"
1850	rctx.Args = nil
1851	rctx.Field = field
1852	rctx.PushField(field.Alias)
1853	defer rctx.Pop()
1854	res := obj.Type()
1855	return ec.___Type(ctx, field.Selections, &res)
1856}
1857
1858func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
1859	rctx := graphql.GetResolverContext(ctx)
1860	rctx.Object = "__Field"
1861	rctx.Args = nil
1862	rctx.Field = field
1863	rctx.PushField(field.Alias)
1864	defer rctx.Pop()
1865	res := obj.IsDeprecated()
1866	return graphql.MarshalBoolean(res)
1867}
1868
1869func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
1870	rctx := graphql.GetResolverContext(ctx)
1871	rctx.Object = "__Field"
1872	rctx.Args = nil
1873	rctx.Field = field
1874	rctx.PushField(field.Alias)
1875	defer rctx.Pop()
1876	res := obj.DeprecationReason()
1877	if res == nil {
1878		return graphql.Null
1879	}
1880	return graphql.MarshalString(*res)
1881}
1882
1883var __InputValueImplementors = []string{"__InputValue"}
1884
1885// nolint: gocyclo, errcheck, gas, goconst
1886func (ec *executionContext) ___InputValue(ctx context.Context, sel []query.Selection, obj *introspection.InputValue) graphql.Marshaler {
1887	fields := graphql.CollectFields(ec.Doc, sel, __InputValueImplementors, ec.Variables)
1888
1889	out := graphql.NewOrderedMap(len(fields))
1890	for i, field := range fields {
1891		out.Keys[i] = field.Alias
1892
1893		switch field.Name {
1894		case "__typename":
1895			out.Values[i] = graphql.MarshalString("__InputValue")
1896		case "name":
1897			out.Values[i] = ec.___InputValue_name(ctx, field, obj)
1898		case "description":
1899			out.Values[i] = ec.___InputValue_description(ctx, field, obj)
1900		case "type":
1901			out.Values[i] = ec.___InputValue_type(ctx, field, obj)
1902		case "defaultValue":
1903			out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
1904		default:
1905			panic("unknown field " + strconv.Quote(field.Name))
1906		}
1907	}
1908
1909	return out
1910}
1911
1912func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
1913	rctx := graphql.GetResolverContext(ctx)
1914	rctx.Object = "__InputValue"
1915	rctx.Args = nil
1916	rctx.Field = field
1917	rctx.PushField(field.Alias)
1918	defer rctx.Pop()
1919	res := obj.Name()
1920	return graphql.MarshalString(res)
1921}
1922
1923func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
1924	rctx := graphql.GetResolverContext(ctx)
1925	rctx.Object = "__InputValue"
1926	rctx.Args = nil
1927	rctx.Field = field
1928	rctx.PushField(field.Alias)
1929	defer rctx.Pop()
1930	res := obj.Description()
1931	if res == nil {
1932		return graphql.Null
1933	}
1934	return graphql.MarshalString(*res)
1935}
1936
1937func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
1938	rctx := graphql.GetResolverContext(ctx)
1939	rctx.Object = "__InputValue"
1940	rctx.Args = nil
1941	rctx.Field = field
1942	rctx.PushField(field.Alias)
1943	defer rctx.Pop()
1944	res := obj.Type()
1945	return ec.___Type(ctx, field.Selections, &res)
1946}
1947
1948func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
1949	rctx := graphql.GetResolverContext(ctx)
1950	rctx.Object = "__InputValue"
1951	rctx.Args = nil
1952	rctx.Field = field
1953	rctx.PushField(field.Alias)
1954	defer rctx.Pop()
1955	res := obj.DefaultValue()
1956	if res == nil {
1957		return graphql.Null
1958	}
1959	return graphql.MarshalString(*res)
1960}
1961
1962var __SchemaImplementors = []string{"__Schema"}
1963
1964// nolint: gocyclo, errcheck, gas, goconst
1965func (ec *executionContext) ___Schema(ctx context.Context, sel []query.Selection, obj *introspection.Schema) graphql.Marshaler {
1966	fields := graphql.CollectFields(ec.Doc, sel, __SchemaImplementors, ec.Variables)
1967
1968	out := graphql.NewOrderedMap(len(fields))
1969	for i, field := range fields {
1970		out.Keys[i] = field.Alias
1971
1972		switch field.Name {
1973		case "__typename":
1974			out.Values[i] = graphql.MarshalString("__Schema")
1975		case "types":
1976			out.Values[i] = ec.___Schema_types(ctx, field, obj)
1977		case "queryType":
1978			out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
1979		case "mutationType":
1980			out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
1981		case "subscriptionType":
1982			out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
1983		case "directives":
1984			out.Values[i] = ec.___Schema_directives(ctx, field, obj)
1985		default:
1986			panic("unknown field " + strconv.Quote(field.Name))
1987		}
1988	}
1989
1990	return out
1991}
1992
1993func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
1994	rctx := graphql.GetResolverContext(ctx)
1995	rctx.Object = "__Schema"
1996	rctx.Args = nil
1997	rctx.Field = field
1998	rctx.PushField(field.Alias)
1999	defer rctx.Pop()
2000	res := obj.Types()
2001	arr1 := graphql.Array{}
2002	for idx1 := range res {
2003		arr1 = append(arr1, func() graphql.Marshaler {
2004			rctx := graphql.GetResolverContext(ctx)
2005			rctx.PushIndex(idx1)
2006			defer rctx.Pop()
2007			return ec.___Type(ctx, field.Selections, &res[idx1])
2008		}())
2009	}
2010	return arr1
2011}
2012
2013func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
2014	rctx := graphql.GetResolverContext(ctx)
2015	rctx.Object = "__Schema"
2016	rctx.Args = nil
2017	rctx.Field = field
2018	rctx.PushField(field.Alias)
2019	defer rctx.Pop()
2020	res := obj.QueryType()
2021	return ec.___Type(ctx, field.Selections, &res)
2022}
2023
2024func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
2025	rctx := graphql.GetResolverContext(ctx)
2026	rctx.Object = "__Schema"
2027	rctx.Args = nil
2028	rctx.Field = field
2029	rctx.PushField(field.Alias)
2030	defer rctx.Pop()
2031	res := obj.MutationType()
2032	if res == nil {
2033		return graphql.Null
2034	}
2035	return ec.___Type(ctx, field.Selections, res)
2036}
2037
2038func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
2039	rctx := graphql.GetResolverContext(ctx)
2040	rctx.Object = "__Schema"
2041	rctx.Args = nil
2042	rctx.Field = field
2043	rctx.PushField(field.Alias)
2044	defer rctx.Pop()
2045	res := obj.SubscriptionType()
2046	if res == nil {
2047		return graphql.Null
2048	}
2049	return ec.___Type(ctx, field.Selections, res)
2050}
2051
2052func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
2053	rctx := graphql.GetResolverContext(ctx)
2054	rctx.Object = "__Schema"
2055	rctx.Args = nil
2056	rctx.Field = field
2057	rctx.PushField(field.Alias)
2058	defer rctx.Pop()
2059	res := obj.Directives()
2060	arr1 := graphql.Array{}
2061	for idx1 := range res {
2062		arr1 = append(arr1, func() graphql.Marshaler {
2063			rctx := graphql.GetResolverContext(ctx)
2064			rctx.PushIndex(idx1)
2065			defer rctx.Pop()
2066			return ec.___Directive(ctx, field.Selections, &res[idx1])
2067		}())
2068	}
2069	return arr1
2070}
2071
2072var __TypeImplementors = []string{"__Type"}
2073
2074// nolint: gocyclo, errcheck, gas, goconst
2075func (ec *executionContext) ___Type(ctx context.Context, sel []query.Selection, obj *introspection.Type) graphql.Marshaler {
2076	fields := graphql.CollectFields(ec.Doc, sel, __TypeImplementors, ec.Variables)
2077
2078	out := graphql.NewOrderedMap(len(fields))
2079	for i, field := range fields {
2080		out.Keys[i] = field.Alias
2081
2082		switch field.Name {
2083		case "__typename":
2084			out.Values[i] = graphql.MarshalString("__Type")
2085		case "kind":
2086			out.Values[i] = ec.___Type_kind(ctx, field, obj)
2087		case "name":
2088			out.Values[i] = ec.___Type_name(ctx, field, obj)
2089		case "description":
2090			out.Values[i] = ec.___Type_description(ctx, field, obj)
2091		case "fields":
2092			out.Values[i] = ec.___Type_fields(ctx, field, obj)
2093		case "interfaces":
2094			out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
2095		case "possibleTypes":
2096			out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
2097		case "enumValues":
2098			out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
2099		case "inputFields":
2100			out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
2101		case "ofType":
2102			out.Values[i] = ec.___Type_ofType(ctx, field, obj)
2103		default:
2104			panic("unknown field " + strconv.Quote(field.Name))
2105		}
2106	}
2107
2108	return out
2109}
2110
2111func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2112	rctx := graphql.GetResolverContext(ctx)
2113	rctx.Object = "__Type"
2114	rctx.Args = nil
2115	rctx.Field = field
2116	rctx.PushField(field.Alias)
2117	defer rctx.Pop()
2118	res := obj.Kind()
2119	return graphql.MarshalString(res)
2120}
2121
2122func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2123	rctx := graphql.GetResolverContext(ctx)
2124	rctx.Object = "__Type"
2125	rctx.Args = nil
2126	rctx.Field = field
2127	rctx.PushField(field.Alias)
2128	defer rctx.Pop()
2129	res := obj.Name()
2130	if res == nil {
2131		return graphql.Null
2132	}
2133	return graphql.MarshalString(*res)
2134}
2135
2136func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2137	rctx := graphql.GetResolverContext(ctx)
2138	rctx.Object = "__Type"
2139	rctx.Args = nil
2140	rctx.Field = field
2141	rctx.PushField(field.Alias)
2142	defer rctx.Pop()
2143	res := obj.Description()
2144	if res == nil {
2145		return graphql.Null
2146	}
2147	return graphql.MarshalString(*res)
2148}
2149
2150func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2151	args := map[string]interface{}{}
2152	var arg0 bool
2153	if tmp, ok := field.Args["includeDeprecated"]; ok {
2154		var err error
2155		arg0, err = graphql.UnmarshalBoolean(tmp)
2156		if err != nil {
2157			ec.Error(ctx, err)
2158			return graphql.Null
2159		}
2160	}
2161	args["includeDeprecated"] = arg0
2162	rctx := graphql.GetResolverContext(ctx)
2163	rctx.Object = "__Type"
2164	rctx.Args = args
2165	rctx.Field = field
2166	rctx.PushField(field.Alias)
2167	defer rctx.Pop()
2168	res := obj.Fields(args["includeDeprecated"].(bool))
2169	arr1 := graphql.Array{}
2170	for idx1 := range res {
2171		arr1 = append(arr1, func() graphql.Marshaler {
2172			rctx := graphql.GetResolverContext(ctx)
2173			rctx.PushIndex(idx1)
2174			defer rctx.Pop()
2175			return ec.___Field(ctx, field.Selections, &res[idx1])
2176		}())
2177	}
2178	return arr1
2179}
2180
2181func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2182	rctx := graphql.GetResolverContext(ctx)
2183	rctx.Object = "__Type"
2184	rctx.Args = nil
2185	rctx.Field = field
2186	rctx.PushField(field.Alias)
2187	defer rctx.Pop()
2188	res := obj.Interfaces()
2189	arr1 := graphql.Array{}
2190	for idx1 := range res {
2191		arr1 = append(arr1, func() graphql.Marshaler {
2192			rctx := graphql.GetResolverContext(ctx)
2193			rctx.PushIndex(idx1)
2194			defer rctx.Pop()
2195			return ec.___Type(ctx, field.Selections, &res[idx1])
2196		}())
2197	}
2198	return arr1
2199}
2200
2201func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2202	rctx := graphql.GetResolverContext(ctx)
2203	rctx.Object = "__Type"
2204	rctx.Args = nil
2205	rctx.Field = field
2206	rctx.PushField(field.Alias)
2207	defer rctx.Pop()
2208	res := obj.PossibleTypes()
2209	arr1 := graphql.Array{}
2210	for idx1 := range res {
2211		arr1 = append(arr1, func() graphql.Marshaler {
2212			rctx := graphql.GetResolverContext(ctx)
2213			rctx.PushIndex(idx1)
2214			defer rctx.Pop()
2215			return ec.___Type(ctx, field.Selections, &res[idx1])
2216		}())
2217	}
2218	return arr1
2219}
2220
2221func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2222	args := map[string]interface{}{}
2223	var arg0 bool
2224	if tmp, ok := field.Args["includeDeprecated"]; ok {
2225		var err error
2226		arg0, err = graphql.UnmarshalBoolean(tmp)
2227		if err != nil {
2228			ec.Error(ctx, err)
2229			return graphql.Null
2230		}
2231	}
2232	args["includeDeprecated"] = arg0
2233	rctx := graphql.GetResolverContext(ctx)
2234	rctx.Object = "__Type"
2235	rctx.Args = args
2236	rctx.Field = field
2237	rctx.PushField(field.Alias)
2238	defer rctx.Pop()
2239	res := obj.EnumValues(args["includeDeprecated"].(bool))
2240	arr1 := graphql.Array{}
2241	for idx1 := range res {
2242		arr1 = append(arr1, func() graphql.Marshaler {
2243			rctx := graphql.GetResolverContext(ctx)
2244			rctx.PushIndex(idx1)
2245			defer rctx.Pop()
2246			return ec.___EnumValue(ctx, field.Selections, &res[idx1])
2247		}())
2248	}
2249	return arr1
2250}
2251
2252func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2253	rctx := graphql.GetResolverContext(ctx)
2254	rctx.Object = "__Type"
2255	rctx.Args = nil
2256	rctx.Field = field
2257	rctx.PushField(field.Alias)
2258	defer rctx.Pop()
2259	res := obj.InputFields()
2260	arr1 := graphql.Array{}
2261	for idx1 := range res {
2262		arr1 = append(arr1, func() graphql.Marshaler {
2263			rctx := graphql.GetResolverContext(ctx)
2264			rctx.PushIndex(idx1)
2265			defer rctx.Pop()
2266			return ec.___InputValue(ctx, field.Selections, &res[idx1])
2267		}())
2268	}
2269	return arr1
2270}
2271
2272func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2273	rctx := graphql.GetResolverContext(ctx)
2274	rctx.Object = "__Type"
2275	rctx.Args = nil
2276	rctx.Field = field
2277	rctx.PushField(field.Alias)
2278	defer rctx.Pop()
2279	res := obj.OfType()
2280	if res == nil {
2281		return graphql.Null
2282	}
2283	return ec.___Type(ctx, field.Selections, res)
2284}
2285
2286func (ec *executionContext) _Authored(ctx context.Context, sel []query.Selection, obj *models.Authored) graphql.Marshaler {
2287	switch obj := (*obj).(type) {
2288	case nil:
2289		return graphql.Null
2290	case bug.Comment:
2291		return ec._Comment(ctx, sel, &obj)
2292	case *bug.Comment:
2293		return ec._Comment(ctx, sel, obj)
2294	case operations.CreateOperation:
2295		return ec._CreateOperation(ctx, sel, &obj)
2296	case *operations.CreateOperation:
2297		return ec._CreateOperation(ctx, sel, obj)
2298	case operations.SetTitleOperation:
2299		return ec._SetTitleOperation(ctx, sel, &obj)
2300	case *operations.SetTitleOperation:
2301		return ec._SetTitleOperation(ctx, sel, obj)
2302	case operations.AddCommentOperation:
2303		return ec._AddCommentOperation(ctx, sel, &obj)
2304	case *operations.AddCommentOperation:
2305		return ec._AddCommentOperation(ctx, sel, obj)
2306	case operations.SetStatusOperation:
2307		return ec._SetStatusOperation(ctx, sel, &obj)
2308	case *operations.SetStatusOperation:
2309		return ec._SetStatusOperation(ctx, sel, obj)
2310	case operations.LabelChangeOperation:
2311		return ec._LabelChangeOperation(ctx, sel, &obj)
2312	case *operations.LabelChangeOperation:
2313		return ec._LabelChangeOperation(ctx, sel, obj)
2314	default:
2315		panic(fmt.Errorf("unexpected type %T", obj))
2316	}
2317}
2318
2319func (ec *executionContext) _Operation(ctx context.Context, sel []query.Selection, obj *models.Operation) graphql.Marshaler {
2320	switch obj := (*obj).(type) {
2321	case nil:
2322		return graphql.Null
2323	case operations.CreateOperation:
2324		return ec._CreateOperation(ctx, sel, &obj)
2325	case *operations.CreateOperation:
2326		return ec._CreateOperation(ctx, sel, obj)
2327	case operations.SetTitleOperation:
2328		return ec._SetTitleOperation(ctx, sel, &obj)
2329	case *operations.SetTitleOperation:
2330		return ec._SetTitleOperation(ctx, sel, obj)
2331	case operations.AddCommentOperation:
2332		return ec._AddCommentOperation(ctx, sel, &obj)
2333	case *operations.AddCommentOperation:
2334		return ec._AddCommentOperation(ctx, sel, obj)
2335	case operations.SetStatusOperation:
2336		return ec._SetStatusOperation(ctx, sel, &obj)
2337	case *operations.SetStatusOperation:
2338		return ec._SetStatusOperation(ctx, sel, obj)
2339	case operations.LabelChangeOperation:
2340		return ec._LabelChangeOperation(ctx, sel, &obj)
2341	case *operations.LabelChangeOperation:
2342		return ec._LabelChangeOperation(ctx, sel, obj)
2343	default:
2344		panic(fmt.Errorf("unexpected type %T", obj))
2345	}
2346}
2347
2348func (ec *executionContext) _OperationUnion(ctx context.Context, sel []query.Selection, obj *models.OperationUnion) graphql.Marshaler {
2349	switch obj := (*obj).(type) {
2350	case nil:
2351		return graphql.Null
2352	case operations.CreateOperation:
2353		return ec._CreateOperation(ctx, sel, &obj)
2354	case *operations.CreateOperation:
2355		return ec._CreateOperation(ctx, sel, obj)
2356	case operations.SetTitleOperation:
2357		return ec._SetTitleOperation(ctx, sel, &obj)
2358	case *operations.SetTitleOperation:
2359		return ec._SetTitleOperation(ctx, sel, obj)
2360	case operations.AddCommentOperation:
2361		return ec._AddCommentOperation(ctx, sel, &obj)
2362	case *operations.AddCommentOperation:
2363		return ec._AddCommentOperation(ctx, sel, obj)
2364	case operations.SetStatusOperation:
2365		return ec._SetStatusOperation(ctx, sel, &obj)
2366	case *operations.SetStatusOperation:
2367		return ec._SetStatusOperation(ctx, sel, obj)
2368	case operations.LabelChangeOperation:
2369		return ec._LabelChangeOperation(ctx, sel, &obj)
2370	case *operations.LabelChangeOperation:
2371		return ec._LabelChangeOperation(ctx, sel, obj)
2372	default:
2373		panic(fmt.Errorf("unexpected type %T", obj))
2374	}
2375}
2376
2377func UnmarshalConnectionInput(v interface{}) (models.ConnectionInput, error) {
2378	var it models.ConnectionInput
2379	var asMap = v.(map[string]interface{})
2380
2381	for k, v := range asMap {
2382		switch k {
2383		case "after":
2384			var err error
2385			var ptr1 string
2386			if v != nil {
2387				ptr1, err = graphql.UnmarshalString(v)
2388				it.After = &ptr1
2389			}
2390
2391			if err != nil {
2392				return it, err
2393			}
2394		case "before":
2395			var err error
2396			var ptr1 string
2397			if v != nil {
2398				ptr1, err = graphql.UnmarshalString(v)
2399				it.Before = &ptr1
2400			}
2401
2402			if err != nil {
2403				return it, err
2404			}
2405		case "first":
2406			var err error
2407			var ptr1 int
2408			if v != nil {
2409				ptr1, err = graphql.UnmarshalInt(v)
2410				it.First = &ptr1
2411			}
2412
2413			if err != nil {
2414				return it, err
2415			}
2416		case "last":
2417			var err error
2418			var ptr1 int
2419			if v != nil {
2420				ptr1, err = graphql.UnmarshalInt(v)
2421				it.Last = &ptr1
2422			}
2423
2424			if err != nil {
2425				return it, err
2426			}
2427		}
2428	}
2429
2430	return it, nil
2431}
2432
2433func (ec *executionContext) introspectSchema() *introspection.Schema {
2434	return introspection.WrapSchema(parsedSchema)
2435}
2436
2437func (ec *executionContext) introspectType(name string) *introspection.Type {
2438	t := parsedSchema.Resolve(name)
2439	if t == nil {
2440		return nil
2441	}
2442	return introspection.WrapType(t)
2443}
2444
2445var parsedSchema = schema.MustParse(`scalar Time
2446scalar Label
2447
2448# Information about pagination in a connection.
2449type PageInfo {
2450  # When paginating forwards, are there more items?
2451  hasNextPage: Boolean!
2452
2453  # When paginating backwards, are there more items?
2454  hasPreviousPage: Boolean!
2455
2456  # When paginating backwards, the cursor to continue.
2457#  startCursor: String
2458
2459  # When paginating forwards, the cursor to continue.
2460#  endCursor: String
2461}
2462
2463input ConnectionInput {
2464  # Returns the elements in the list that come after the specified cursor.
2465  after: String
2466
2467  # Returns the elements in the list that come before the specified cursor.
2468  before: String
2469
2470  # Returns the first _n_ elements from the list.
2471  first: Int
2472
2473  # Returns the last _n_ elements from the list.
2474  last: Int
2475}
2476
2477# Represents an person in a git object.
2478type Person {
2479  # The email of the person.
2480  email: String
2481
2482  # The name of the person.
2483  name: String
2484}
2485
2486
2487type CommentConnection {
2488  edges: [CommentEdge!]!
2489  pageInfo: PageInfo!
2490  totalCount: Int!
2491}
2492
2493type CommentEdge {
2494  cursor: String!
2495  node: Comment!
2496}
2497
2498# Represents a comment on a bug.
2499type Comment implements Authored {
2500  # The author of this comment.
2501  author: Person!
2502
2503  # The message of this comment.
2504  message: String!
2505}
2506
2507enum Status {
2508  OPEN
2509  CLOSED
2510}
2511
2512# An object that has an author.
2513interface Authored {
2514  # The author of this object.
2515  author: Person!
2516}
2517
2518type OperationConnection {
2519  edges: [OperationEdge!]!
2520  pageInfo: PageInfo!
2521  totalCount: Int!
2522}
2523
2524type OperationEdge {
2525  cursor: String!
2526  node: OperationUnion!
2527}
2528
2529# An operation applied to a bug.
2530interface Operation {
2531  # The operations author.
2532  author: Person!
2533
2534  # The datetime when this operation was issued.
2535  date: Time!
2536}
2537
2538type CreateOperation implements Operation, Authored {
2539  author: Person!
2540  date: Time!
2541
2542  title: String!
2543  message: String!
2544}
2545
2546type SetTitleOperation implements Operation, Authored {
2547  author: Person!
2548  date: Time!
2549
2550  title: String!
2551}
2552
2553type AddCommentOperation implements Operation, Authored {
2554  author: Person!
2555  date: Time!
2556
2557  message: String!
2558}
2559
2560type SetStatusOperation implements Operation, Authored {
2561  author: Person!
2562  date: Time!
2563
2564  status: Status!
2565}
2566
2567type LabelChangeOperation implements Operation, Authored {
2568  author: Person!
2569  date: Time!
2570
2571  added: [Label!]!
2572  removed: [Label!]!
2573}
2574
2575union OperationUnion =
2576    CreateOperation
2577  | SetTitleOperation
2578  | AddCommentOperation
2579  | SetStatusOperation
2580  | LabelChangeOperation
2581
2582# The connection type for Bug.
2583type BugConnection {
2584  # A list of edges.
2585  edges: [BugEdge!]!
2586
2587  # Information to aid in pagination.
2588  pageInfo: PageInfo!
2589
2590  # Identifies the total count of items in the connection.
2591  totalCount: Int!
2592}
2593
2594# An edge in a connection.
2595type BugEdge {
2596  # A cursor for use in pagination.
2597  cursor: String!
2598
2599  # The item at the end of the edge.
2600  node: Bug!
2601}
2602
2603type Bug {
2604  id: String!
2605  humanId: String!
2606  title: String!
2607  status: Status!
2608
2609  # A list of labels associated with the repository.
2610  labels: [Label!]!
2611
2612  comments(input: ConnectionInput!): CommentConnection!
2613
2614  operations(input: ConnectionInput!): OperationConnection!
2615}
2616
2617type Repository {
2618  allBugs(input: ConnectionInput!): BugConnection!
2619  bug(prefix: String!): Bug
2620}
2621
2622type Query {
2623  defaultRepository: Repository
2624  repository(id: String!): Repository
2625}
2626`)