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, after *string, before *string, first *int, last *int) (models.CommentConnection, error)
  37	Bug_operations(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (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	Mutation_newBug(ctx context.Context, repoRef *string, title string, message string) (bug.Snapshot, error)
  44	Mutation_addComment(ctx context.Context, repoRef *string, prefix string, message string) (bug.Snapshot, error)
  45	Mutation_changeLabels(ctx context.Context, repoRef *string, prefix string, added []string, removed []string) (bug.Snapshot, error)
  46	Mutation_open(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error)
  47	Mutation_close(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error)
  48	Mutation_setTitle(ctx context.Context, repoRef *string, prefix string, title string) (bug.Snapshot, error)
  49	Mutation_commit(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error)
  50
  51	Query_defaultRepository(ctx context.Context) (*models.Repository, error)
  52	Query_repository(ctx context.Context, id string) (*models.Repository, error)
  53
  54	Repository_allBugs(ctx context.Context, obj *models.Repository, after *string, before *string, first *int, last *int) (models.BugConnection, error)
  55	Repository_bug(ctx context.Context, obj *models.Repository, prefix string) (*bug.Snapshot, error)
  56
  57	SetStatusOperation_date(ctx context.Context, obj *operations.SetStatusOperation) (time.Time, error)
  58	SetStatusOperation_status(ctx context.Context, obj *operations.SetStatusOperation) (models.Status, error)
  59
  60	SetTitleOperation_date(ctx context.Context, obj *operations.SetTitleOperation) (time.Time, error)
  61}
  62
  63type ResolverRoot interface {
  64	AddCommentOperation() AddCommentOperationResolver
  65	Bug() BugResolver
  66	CreateOperation() CreateOperationResolver
  67	LabelChangeOperation() LabelChangeOperationResolver
  68	Mutation() MutationResolver
  69	Query() QueryResolver
  70	Repository() RepositoryResolver
  71	SetStatusOperation() SetStatusOperationResolver
  72	SetTitleOperation() SetTitleOperationResolver
  73}
  74type AddCommentOperationResolver interface {
  75	Date(ctx context.Context, obj *operations.AddCommentOperation) (time.Time, error)
  76}
  77type BugResolver interface {
  78	Status(ctx context.Context, obj *bug.Snapshot) (models.Status, error)
  79
  80	Comments(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.CommentConnection, error)
  81	Operations(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.OperationConnection, error)
  82}
  83type CreateOperationResolver interface {
  84	Date(ctx context.Context, obj *operations.CreateOperation) (time.Time, error)
  85}
  86type LabelChangeOperationResolver interface {
  87	Date(ctx context.Context, obj *operations.LabelChangeOperation) (time.Time, error)
  88}
  89type MutationResolver interface {
  90	NewBug(ctx context.Context, repoRef *string, title string, message string) (bug.Snapshot, error)
  91	AddComment(ctx context.Context, repoRef *string, prefix string, message string) (bug.Snapshot, error)
  92	ChangeLabels(ctx context.Context, repoRef *string, prefix string, added []string, removed []string) (bug.Snapshot, error)
  93	Open(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error)
  94	Close(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error)
  95	SetTitle(ctx context.Context, repoRef *string, prefix string, title string) (bug.Snapshot, error)
  96	Commit(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error)
  97}
  98type QueryResolver interface {
  99	DefaultRepository(ctx context.Context) (*models.Repository, error)
 100	Repository(ctx context.Context, id string) (*models.Repository, error)
 101}
 102type RepositoryResolver interface {
 103	AllBugs(ctx context.Context, obj *models.Repository, after *string, before *string, first *int, last *int) (models.BugConnection, error)
 104	Bug(ctx context.Context, obj *models.Repository, prefix string) (*bug.Snapshot, error)
 105}
 106type SetStatusOperationResolver interface {
 107	Date(ctx context.Context, obj *operations.SetStatusOperation) (time.Time, error)
 108	Status(ctx context.Context, obj *operations.SetStatusOperation) (models.Status, error)
 109}
 110type SetTitleOperationResolver interface {
 111	Date(ctx context.Context, obj *operations.SetTitleOperation) (time.Time, error)
 112}
 113
 114type shortMapper struct {
 115	r ResolverRoot
 116}
 117
 118func (s shortMapper) AddCommentOperation_date(ctx context.Context, obj *operations.AddCommentOperation) (time.Time, error) {
 119	return s.r.AddCommentOperation().Date(ctx, obj)
 120}
 121
 122func (s shortMapper) Bug_status(ctx context.Context, obj *bug.Snapshot) (models.Status, error) {
 123	return s.r.Bug().Status(ctx, obj)
 124}
 125
 126func (s shortMapper) Bug_comments(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.CommentConnection, error) {
 127	return s.r.Bug().Comments(ctx, obj, after, before, first, last)
 128}
 129
 130func (s shortMapper) Bug_operations(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.OperationConnection, error) {
 131	return s.r.Bug().Operations(ctx, obj, after, before, first, last)
 132}
 133
 134func (s shortMapper) CreateOperation_date(ctx context.Context, obj *operations.CreateOperation) (time.Time, error) {
 135	return s.r.CreateOperation().Date(ctx, obj)
 136}
 137
 138func (s shortMapper) LabelChangeOperation_date(ctx context.Context, obj *operations.LabelChangeOperation) (time.Time, error) {
 139	return s.r.LabelChangeOperation().Date(ctx, obj)
 140}
 141
 142func (s shortMapper) Mutation_newBug(ctx context.Context, repoRef *string, title string, message string) (bug.Snapshot, error) {
 143	return s.r.Mutation().NewBug(ctx, repoRef, title, message)
 144}
 145
 146func (s shortMapper) Mutation_addComment(ctx context.Context, repoRef *string, prefix string, message string) (bug.Snapshot, error) {
 147	return s.r.Mutation().AddComment(ctx, repoRef, prefix, message)
 148}
 149
 150func (s shortMapper) Mutation_changeLabels(ctx context.Context, repoRef *string, prefix string, added []string, removed []string) (bug.Snapshot, error) {
 151	return s.r.Mutation().ChangeLabels(ctx, repoRef, prefix, added, removed)
 152}
 153
 154func (s shortMapper) Mutation_open(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error) {
 155	return s.r.Mutation().Open(ctx, repoRef, prefix)
 156}
 157
 158func (s shortMapper) Mutation_close(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error) {
 159	return s.r.Mutation().Close(ctx, repoRef, prefix)
 160}
 161
 162func (s shortMapper) Mutation_setTitle(ctx context.Context, repoRef *string, prefix string, title string) (bug.Snapshot, error) {
 163	return s.r.Mutation().SetTitle(ctx, repoRef, prefix, title)
 164}
 165
 166func (s shortMapper) Mutation_commit(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error) {
 167	return s.r.Mutation().Commit(ctx, repoRef, prefix)
 168}
 169
 170func (s shortMapper) Query_defaultRepository(ctx context.Context) (*models.Repository, error) {
 171	return s.r.Query().DefaultRepository(ctx)
 172}
 173
 174func (s shortMapper) Query_repository(ctx context.Context, id string) (*models.Repository, error) {
 175	return s.r.Query().Repository(ctx, id)
 176}
 177
 178func (s shortMapper) Repository_allBugs(ctx context.Context, obj *models.Repository, after *string, before *string, first *int, last *int) (models.BugConnection, error) {
 179	return s.r.Repository().AllBugs(ctx, obj, after, before, first, last)
 180}
 181
 182func (s shortMapper) Repository_bug(ctx context.Context, obj *models.Repository, prefix string) (*bug.Snapshot, error) {
 183	return s.r.Repository().Bug(ctx, obj, prefix)
 184}
 185
 186func (s shortMapper) SetStatusOperation_date(ctx context.Context, obj *operations.SetStatusOperation) (time.Time, error) {
 187	return s.r.SetStatusOperation().Date(ctx, obj)
 188}
 189
 190func (s shortMapper) SetStatusOperation_status(ctx context.Context, obj *operations.SetStatusOperation) (models.Status, error) {
 191	return s.r.SetStatusOperation().Status(ctx, obj)
 192}
 193
 194func (s shortMapper) SetTitleOperation_date(ctx context.Context, obj *operations.SetTitleOperation) (time.Time, error) {
 195	return s.r.SetTitleOperation().Date(ctx, obj)
 196}
 197
 198type executableSchema struct {
 199	resolvers Resolvers
 200}
 201
 202func (e *executableSchema) Schema() *schema.Schema {
 203	return parsedSchema
 204}
 205
 206func (e *executableSchema) Query(ctx context.Context, op *query.Operation) *graphql.Response {
 207	ec := executionContext{graphql.GetRequestContext(ctx), e.resolvers}
 208
 209	buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {
 210		data := ec._Query(ctx, op.Selections)
 211		var buf bytes.Buffer
 212		data.MarshalGQL(&buf)
 213		return buf.Bytes()
 214	})
 215
 216	return &graphql.Response{
 217		Data:   buf,
 218		Errors: ec.Errors,
 219	}
 220}
 221
 222func (e *executableSchema) Mutation(ctx context.Context, op *query.Operation) *graphql.Response {
 223	ec := executionContext{graphql.GetRequestContext(ctx), e.resolvers}
 224
 225	buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte {
 226		data := ec._Mutation(ctx, op.Selections)
 227		var buf bytes.Buffer
 228		data.MarshalGQL(&buf)
 229		return buf.Bytes()
 230	})
 231
 232	return &graphql.Response{
 233		Data:   buf,
 234		Errors: ec.Errors,
 235	}
 236}
 237
 238func (e *executableSchema) Subscription(ctx context.Context, op *query.Operation) func() *graphql.Response {
 239	return graphql.OneShot(graphql.ErrorResponse(ctx, "subscriptions are not supported"))
 240}
 241
 242type executionContext struct {
 243	*graphql.RequestContext
 244
 245	resolvers Resolvers
 246}
 247
 248var addCommentOperationImplementors = []string{"AddCommentOperation", "Operation", "Authored"}
 249
 250// nolint: gocyclo, errcheck, gas, goconst
 251func (ec *executionContext) _AddCommentOperation(ctx context.Context, sel []query.Selection, obj *operations.AddCommentOperation) graphql.Marshaler {
 252	fields := graphql.CollectFields(ec.Doc, sel, addCommentOperationImplementors, ec.Variables)
 253
 254	out := graphql.NewOrderedMap(len(fields))
 255	for i, field := range fields {
 256		out.Keys[i] = field.Alias
 257
 258		switch field.Name {
 259		case "__typename":
 260			out.Values[i] = graphql.MarshalString("AddCommentOperation")
 261		case "author":
 262			out.Values[i] = ec._AddCommentOperation_author(ctx, field, obj)
 263		case "date":
 264			out.Values[i] = ec._AddCommentOperation_date(ctx, field, obj)
 265		case "message":
 266			out.Values[i] = ec._AddCommentOperation_message(ctx, field, obj)
 267		default:
 268			panic("unknown field " + strconv.Quote(field.Name))
 269		}
 270	}
 271
 272	return out
 273}
 274
 275func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.AddCommentOperation) graphql.Marshaler {
 276	rctx := graphql.GetResolverContext(ctx)
 277	rctx.Object = "AddCommentOperation"
 278	rctx.Args = nil
 279	rctx.Field = field
 280	rctx.PushField(field.Alias)
 281	defer rctx.Pop()
 282	res := obj.Author
 283	return ec._Person(ctx, field.Selections, &res)
 284}
 285
 286func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.AddCommentOperation) graphql.Marshaler {
 287	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 288		Object: "AddCommentOperation",
 289		Args:   nil,
 290		Field:  field,
 291	})
 292	return graphql.Defer(func() (ret graphql.Marshaler) {
 293		defer func() {
 294			if r := recover(); r != nil {
 295				userErr := ec.Recover(ctx, r)
 296				ec.Error(ctx, userErr)
 297				ret = graphql.Null
 298			}
 299		}()
 300
 301		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 302			return ec.resolvers.AddCommentOperation_date(ctx, obj)
 303		})
 304		if err != nil {
 305			ec.Error(ctx, err)
 306			return graphql.Null
 307		}
 308		if resTmp == nil {
 309			return graphql.Null
 310		}
 311		res := resTmp.(time.Time)
 312		return graphql.MarshalTime(res)
 313	})
 314}
 315
 316func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *operations.AddCommentOperation) graphql.Marshaler {
 317	rctx := graphql.GetResolverContext(ctx)
 318	rctx.Object = "AddCommentOperation"
 319	rctx.Args = nil
 320	rctx.Field = field
 321	rctx.PushField(field.Alias)
 322	defer rctx.Pop()
 323	res := obj.Message
 324	return graphql.MarshalString(res)
 325}
 326
 327var bugImplementors = []string{"Bug"}
 328
 329// nolint: gocyclo, errcheck, gas, goconst
 330func (ec *executionContext) _Bug(ctx context.Context, sel []query.Selection, obj *bug.Snapshot) graphql.Marshaler {
 331	fields := graphql.CollectFields(ec.Doc, sel, bugImplementors, ec.Variables)
 332
 333	out := graphql.NewOrderedMap(len(fields))
 334	for i, field := range fields {
 335		out.Keys[i] = field.Alias
 336
 337		switch field.Name {
 338		case "__typename":
 339			out.Values[i] = graphql.MarshalString("Bug")
 340		case "id":
 341			out.Values[i] = ec._Bug_id(ctx, field, obj)
 342		case "humanId":
 343			out.Values[i] = ec._Bug_humanId(ctx, field, obj)
 344		case "status":
 345			out.Values[i] = ec._Bug_status(ctx, field, obj)
 346		case "title":
 347			out.Values[i] = ec._Bug_title(ctx, field, obj)
 348		case "labels":
 349			out.Values[i] = ec._Bug_labels(ctx, field, obj)
 350		case "author":
 351			out.Values[i] = ec._Bug_author(ctx, field, obj)
 352		case "createdAt":
 353			out.Values[i] = ec._Bug_createdAt(ctx, field, obj)
 354		case "lastEdit":
 355			out.Values[i] = ec._Bug_lastEdit(ctx, field, obj)
 356		case "comments":
 357			out.Values[i] = ec._Bug_comments(ctx, field, obj)
 358		case "operations":
 359			out.Values[i] = ec._Bug_operations(ctx, field, obj)
 360		default:
 361			panic("unknown field " + strconv.Quote(field.Name))
 362		}
 363	}
 364
 365	return out
 366}
 367
 368func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 369	rctx := graphql.GetResolverContext(ctx)
 370	rctx.Object = "Bug"
 371	rctx.Args = nil
 372	rctx.Field = field
 373	rctx.PushField(field.Alias)
 374	defer rctx.Pop()
 375	res := obj.Id()
 376	return graphql.MarshalString(res)
 377}
 378
 379func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 380	rctx := graphql.GetResolverContext(ctx)
 381	rctx.Object = "Bug"
 382	rctx.Args = nil
 383	rctx.Field = field
 384	rctx.PushField(field.Alias)
 385	defer rctx.Pop()
 386	res := obj.HumanId()
 387	return graphql.MarshalString(res)
 388}
 389
 390func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 391	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 392		Object: "Bug",
 393		Args:   nil,
 394		Field:  field,
 395	})
 396	return graphql.Defer(func() (ret graphql.Marshaler) {
 397		defer func() {
 398			if r := recover(); r != nil {
 399				userErr := ec.Recover(ctx, r)
 400				ec.Error(ctx, userErr)
 401				ret = graphql.Null
 402			}
 403		}()
 404
 405		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 406			return ec.resolvers.Bug_status(ctx, obj)
 407		})
 408		if err != nil {
 409			ec.Error(ctx, err)
 410			return graphql.Null
 411		}
 412		if resTmp == nil {
 413			return graphql.Null
 414		}
 415		res := resTmp.(models.Status)
 416		return res
 417	})
 418}
 419
 420func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 421	rctx := graphql.GetResolverContext(ctx)
 422	rctx.Object = "Bug"
 423	rctx.Args = nil
 424	rctx.Field = field
 425	rctx.PushField(field.Alias)
 426	defer rctx.Pop()
 427	res := obj.Title
 428	return graphql.MarshalString(res)
 429}
 430
 431func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 432	rctx := graphql.GetResolverContext(ctx)
 433	rctx.Object = "Bug"
 434	rctx.Args = nil
 435	rctx.Field = field
 436	rctx.PushField(field.Alias)
 437	defer rctx.Pop()
 438	res := obj.Labels
 439	arr1 := graphql.Array{}
 440	for idx1 := range res {
 441		arr1 = append(arr1, func() graphql.Marshaler {
 442			rctx := graphql.GetResolverContext(ctx)
 443			rctx.PushIndex(idx1)
 444			defer rctx.Pop()
 445			return res[idx1]
 446		}())
 447	}
 448	return arr1
 449}
 450
 451func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 452	rctx := graphql.GetResolverContext(ctx)
 453	rctx.Object = "Bug"
 454	rctx.Args = nil
 455	rctx.Field = field
 456	rctx.PushField(field.Alias)
 457	defer rctx.Pop()
 458	res := obj.Author
 459	return ec._Person(ctx, field.Selections, &res)
 460}
 461
 462func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 463	rctx := graphql.GetResolverContext(ctx)
 464	rctx.Object = "Bug"
 465	rctx.Args = nil
 466	rctx.Field = field
 467	rctx.PushField(field.Alias)
 468	defer rctx.Pop()
 469	res := obj.CreatedAt
 470	return graphql.MarshalTime(res)
 471}
 472
 473func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 474	rctx := graphql.GetResolverContext(ctx)
 475	rctx.Object = "Bug"
 476	rctx.Args = nil
 477	rctx.Field = field
 478	rctx.PushField(field.Alias)
 479	defer rctx.Pop()
 480	res := obj.LastEdit()
 481	return graphql.MarshalTime(res)
 482}
 483
 484func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 485	args := map[string]interface{}{}
 486	var arg0 *string
 487	if tmp, ok := field.Args["after"]; ok {
 488		var err error
 489		var ptr1 string
 490		if tmp != nil {
 491			ptr1, err = graphql.UnmarshalString(tmp)
 492			arg0 = &ptr1
 493		}
 494
 495		if err != nil {
 496			ec.Error(ctx, err)
 497			return graphql.Null
 498		}
 499	}
 500	args["after"] = arg0
 501	var arg1 *string
 502	if tmp, ok := field.Args["before"]; ok {
 503		var err error
 504		var ptr1 string
 505		if tmp != nil {
 506			ptr1, err = graphql.UnmarshalString(tmp)
 507			arg1 = &ptr1
 508		}
 509
 510		if err != nil {
 511			ec.Error(ctx, err)
 512			return graphql.Null
 513		}
 514	}
 515	args["before"] = arg1
 516	var arg2 *int
 517	if tmp, ok := field.Args["first"]; ok {
 518		var err error
 519		var ptr1 int
 520		if tmp != nil {
 521			ptr1, err = graphql.UnmarshalInt(tmp)
 522			arg2 = &ptr1
 523		}
 524
 525		if err != nil {
 526			ec.Error(ctx, err)
 527			return graphql.Null
 528		}
 529	}
 530	args["first"] = arg2
 531	var arg3 *int
 532	if tmp, ok := field.Args["last"]; ok {
 533		var err error
 534		var ptr1 int
 535		if tmp != nil {
 536			ptr1, err = graphql.UnmarshalInt(tmp)
 537			arg3 = &ptr1
 538		}
 539
 540		if err != nil {
 541			ec.Error(ctx, err)
 542			return graphql.Null
 543		}
 544	}
 545	args["last"] = arg3
 546	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 547		Object: "Bug",
 548		Args:   args,
 549		Field:  field,
 550	})
 551	return graphql.Defer(func() (ret graphql.Marshaler) {
 552		defer func() {
 553			if r := recover(); r != nil {
 554				userErr := ec.Recover(ctx, r)
 555				ec.Error(ctx, userErr)
 556				ret = graphql.Null
 557			}
 558		}()
 559
 560		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 561			return ec.resolvers.Bug_comments(ctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
 562		})
 563		if err != nil {
 564			ec.Error(ctx, err)
 565			return graphql.Null
 566		}
 567		if resTmp == nil {
 568			return graphql.Null
 569		}
 570		res := resTmp.(models.CommentConnection)
 571		return ec._CommentConnection(ctx, field.Selections, &res)
 572	})
 573}
 574
 575func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
 576	args := map[string]interface{}{}
 577	var arg0 *string
 578	if tmp, ok := field.Args["after"]; ok {
 579		var err error
 580		var ptr1 string
 581		if tmp != nil {
 582			ptr1, err = graphql.UnmarshalString(tmp)
 583			arg0 = &ptr1
 584		}
 585
 586		if err != nil {
 587			ec.Error(ctx, err)
 588			return graphql.Null
 589		}
 590	}
 591	args["after"] = arg0
 592	var arg1 *string
 593	if tmp, ok := field.Args["before"]; ok {
 594		var err error
 595		var ptr1 string
 596		if tmp != nil {
 597			ptr1, err = graphql.UnmarshalString(tmp)
 598			arg1 = &ptr1
 599		}
 600
 601		if err != nil {
 602			ec.Error(ctx, err)
 603			return graphql.Null
 604		}
 605	}
 606	args["before"] = arg1
 607	var arg2 *int
 608	if tmp, ok := field.Args["first"]; ok {
 609		var err error
 610		var ptr1 int
 611		if tmp != nil {
 612			ptr1, err = graphql.UnmarshalInt(tmp)
 613			arg2 = &ptr1
 614		}
 615
 616		if err != nil {
 617			ec.Error(ctx, err)
 618			return graphql.Null
 619		}
 620	}
 621	args["first"] = arg2
 622	var arg3 *int
 623	if tmp, ok := field.Args["last"]; ok {
 624		var err error
 625		var ptr1 int
 626		if tmp != nil {
 627			ptr1, err = graphql.UnmarshalInt(tmp)
 628			arg3 = &ptr1
 629		}
 630
 631		if err != nil {
 632			ec.Error(ctx, err)
 633			return graphql.Null
 634		}
 635	}
 636	args["last"] = arg3
 637	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
 638		Object: "Bug",
 639		Args:   args,
 640		Field:  field,
 641	})
 642	return graphql.Defer(func() (ret graphql.Marshaler) {
 643		defer func() {
 644			if r := recover(); r != nil {
 645				userErr := ec.Recover(ctx, r)
 646				ec.Error(ctx, userErr)
 647				ret = graphql.Null
 648			}
 649		}()
 650
 651		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
 652			return ec.resolvers.Bug_operations(ctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
 653		})
 654		if err != nil {
 655			ec.Error(ctx, err)
 656			return graphql.Null
 657		}
 658		if resTmp == nil {
 659			return graphql.Null
 660		}
 661		res := resTmp.(models.OperationConnection)
 662		return ec._OperationConnection(ctx, field.Selections, &res)
 663	})
 664}
 665
 666var bugConnectionImplementors = []string{"BugConnection"}
 667
 668// nolint: gocyclo, errcheck, gas, goconst
 669func (ec *executionContext) _BugConnection(ctx context.Context, sel []query.Selection, obj *models.BugConnection) graphql.Marshaler {
 670	fields := graphql.CollectFields(ec.Doc, sel, bugConnectionImplementors, ec.Variables)
 671
 672	out := graphql.NewOrderedMap(len(fields))
 673	for i, field := range fields {
 674		out.Keys[i] = field.Alias
 675
 676		switch field.Name {
 677		case "__typename":
 678			out.Values[i] = graphql.MarshalString("BugConnection")
 679		case "edges":
 680			out.Values[i] = ec._BugConnection_edges(ctx, field, obj)
 681		case "nodes":
 682			out.Values[i] = ec._BugConnection_nodes(ctx, field, obj)
 683		case "pageInfo":
 684			out.Values[i] = ec._BugConnection_pageInfo(ctx, field, obj)
 685		case "totalCount":
 686			out.Values[i] = ec._BugConnection_totalCount(ctx, field, obj)
 687		default:
 688			panic("unknown field " + strconv.Quote(field.Name))
 689		}
 690	}
 691
 692	return out
 693}
 694
 695func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
 696	rctx := graphql.GetResolverContext(ctx)
 697	rctx.Object = "BugConnection"
 698	rctx.Args = nil
 699	rctx.Field = field
 700	rctx.PushField(field.Alias)
 701	defer rctx.Pop()
 702	res := obj.Edges
 703	arr1 := graphql.Array{}
 704	for idx1 := range res {
 705		arr1 = append(arr1, func() graphql.Marshaler {
 706			rctx := graphql.GetResolverContext(ctx)
 707			rctx.PushIndex(idx1)
 708			defer rctx.Pop()
 709			return ec._BugEdge(ctx, field.Selections, &res[idx1])
 710		}())
 711	}
 712	return arr1
 713}
 714
 715func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
 716	rctx := graphql.GetResolverContext(ctx)
 717	rctx.Object = "BugConnection"
 718	rctx.Args = nil
 719	rctx.Field = field
 720	rctx.PushField(field.Alias)
 721	defer rctx.Pop()
 722	res := obj.Nodes
 723	arr1 := graphql.Array{}
 724	for idx1 := range res {
 725		arr1 = append(arr1, func() graphql.Marshaler {
 726			rctx := graphql.GetResolverContext(ctx)
 727			rctx.PushIndex(idx1)
 728			defer rctx.Pop()
 729			return ec._Bug(ctx, field.Selections, &res[idx1])
 730		}())
 731	}
 732	return arr1
 733}
 734
 735func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
 736	rctx := graphql.GetResolverContext(ctx)
 737	rctx.Object = "BugConnection"
 738	rctx.Args = nil
 739	rctx.Field = field
 740	rctx.PushField(field.Alias)
 741	defer rctx.Pop()
 742	res := obj.PageInfo
 743	return ec._PageInfo(ctx, field.Selections, &res)
 744}
 745
 746func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
 747	rctx := graphql.GetResolverContext(ctx)
 748	rctx.Object = "BugConnection"
 749	rctx.Args = nil
 750	rctx.Field = field
 751	rctx.PushField(field.Alias)
 752	defer rctx.Pop()
 753	res := obj.TotalCount
 754	return graphql.MarshalInt(res)
 755}
 756
 757var bugEdgeImplementors = []string{"BugEdge"}
 758
 759// nolint: gocyclo, errcheck, gas, goconst
 760func (ec *executionContext) _BugEdge(ctx context.Context, sel []query.Selection, obj *models.BugEdge) graphql.Marshaler {
 761	fields := graphql.CollectFields(ec.Doc, sel, bugEdgeImplementors, ec.Variables)
 762
 763	out := graphql.NewOrderedMap(len(fields))
 764	for i, field := range fields {
 765		out.Keys[i] = field.Alias
 766
 767		switch field.Name {
 768		case "__typename":
 769			out.Values[i] = graphql.MarshalString("BugEdge")
 770		case "cursor":
 771			out.Values[i] = ec._BugEdge_cursor(ctx, field, obj)
 772		case "node":
 773			out.Values[i] = ec._BugEdge_node(ctx, field, obj)
 774		default:
 775			panic("unknown field " + strconv.Quote(field.Name))
 776		}
 777	}
 778
 779	return out
 780}
 781
 782func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler {
 783	rctx := graphql.GetResolverContext(ctx)
 784	rctx.Object = "BugEdge"
 785	rctx.Args = nil
 786	rctx.Field = field
 787	rctx.PushField(field.Alias)
 788	defer rctx.Pop()
 789	res := obj.Cursor
 790	return graphql.MarshalString(res)
 791}
 792
 793func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler {
 794	rctx := graphql.GetResolverContext(ctx)
 795	rctx.Object = "BugEdge"
 796	rctx.Args = nil
 797	rctx.Field = field
 798	rctx.PushField(field.Alias)
 799	defer rctx.Pop()
 800	res := obj.Node
 801	return ec._Bug(ctx, field.Selections, &res)
 802}
 803
 804var commentImplementors = []string{"Comment", "Authored"}
 805
 806// nolint: gocyclo, errcheck, gas, goconst
 807func (ec *executionContext) _Comment(ctx context.Context, sel []query.Selection, obj *bug.Comment) graphql.Marshaler {
 808	fields := graphql.CollectFields(ec.Doc, sel, commentImplementors, ec.Variables)
 809
 810	out := graphql.NewOrderedMap(len(fields))
 811	for i, field := range fields {
 812		out.Keys[i] = field.Alias
 813
 814		switch field.Name {
 815		case "__typename":
 816			out.Values[i] = graphql.MarshalString("Comment")
 817		case "author":
 818			out.Values[i] = ec._Comment_author(ctx, field, obj)
 819		case "message":
 820			out.Values[i] = ec._Comment_message(ctx, field, obj)
 821		default:
 822			panic("unknown field " + strconv.Quote(field.Name))
 823		}
 824	}
 825
 826	return out
 827}
 828
 829func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
 830	rctx := graphql.GetResolverContext(ctx)
 831	rctx.Object = "Comment"
 832	rctx.Args = nil
 833	rctx.Field = field
 834	rctx.PushField(field.Alias)
 835	defer rctx.Pop()
 836	res := obj.Author
 837	return ec._Person(ctx, field.Selections, &res)
 838}
 839
 840func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
 841	rctx := graphql.GetResolverContext(ctx)
 842	rctx.Object = "Comment"
 843	rctx.Args = nil
 844	rctx.Field = field
 845	rctx.PushField(field.Alias)
 846	defer rctx.Pop()
 847	res := obj.Message
 848	return graphql.MarshalString(res)
 849}
 850
 851var commentConnectionImplementors = []string{"CommentConnection"}
 852
 853// nolint: gocyclo, errcheck, gas, goconst
 854func (ec *executionContext) _CommentConnection(ctx context.Context, sel []query.Selection, obj *models.CommentConnection) graphql.Marshaler {
 855	fields := graphql.CollectFields(ec.Doc, sel, commentConnectionImplementors, ec.Variables)
 856
 857	out := graphql.NewOrderedMap(len(fields))
 858	for i, field := range fields {
 859		out.Keys[i] = field.Alias
 860
 861		switch field.Name {
 862		case "__typename":
 863			out.Values[i] = graphql.MarshalString("CommentConnection")
 864		case "edges":
 865			out.Values[i] = ec._CommentConnection_edges(ctx, field, obj)
 866		case "nodes":
 867			out.Values[i] = ec._CommentConnection_nodes(ctx, field, obj)
 868		case "pageInfo":
 869			out.Values[i] = ec._CommentConnection_pageInfo(ctx, field, obj)
 870		case "totalCount":
 871			out.Values[i] = ec._CommentConnection_totalCount(ctx, field, obj)
 872		default:
 873			panic("unknown field " + strconv.Quote(field.Name))
 874		}
 875	}
 876
 877	return out
 878}
 879
 880func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
 881	rctx := graphql.GetResolverContext(ctx)
 882	rctx.Object = "CommentConnection"
 883	rctx.Args = nil
 884	rctx.Field = field
 885	rctx.PushField(field.Alias)
 886	defer rctx.Pop()
 887	res := obj.Edges
 888	arr1 := graphql.Array{}
 889	for idx1 := range res {
 890		arr1 = append(arr1, func() graphql.Marshaler {
 891			rctx := graphql.GetResolverContext(ctx)
 892			rctx.PushIndex(idx1)
 893			defer rctx.Pop()
 894			return ec._CommentEdge(ctx, field.Selections, &res[idx1])
 895		}())
 896	}
 897	return arr1
 898}
 899
 900func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
 901	rctx := graphql.GetResolverContext(ctx)
 902	rctx.Object = "CommentConnection"
 903	rctx.Args = nil
 904	rctx.Field = field
 905	rctx.PushField(field.Alias)
 906	defer rctx.Pop()
 907	res := obj.Nodes
 908	arr1 := graphql.Array{}
 909	for idx1 := range res {
 910		arr1 = append(arr1, func() graphql.Marshaler {
 911			rctx := graphql.GetResolverContext(ctx)
 912			rctx.PushIndex(idx1)
 913			defer rctx.Pop()
 914			return ec._Comment(ctx, field.Selections, &res[idx1])
 915		}())
 916	}
 917	return arr1
 918}
 919
 920func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
 921	rctx := graphql.GetResolverContext(ctx)
 922	rctx.Object = "CommentConnection"
 923	rctx.Args = nil
 924	rctx.Field = field
 925	rctx.PushField(field.Alias)
 926	defer rctx.Pop()
 927	res := obj.PageInfo
 928	return ec._PageInfo(ctx, field.Selections, &res)
 929}
 930
 931func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
 932	rctx := graphql.GetResolverContext(ctx)
 933	rctx.Object = "CommentConnection"
 934	rctx.Args = nil
 935	rctx.Field = field
 936	rctx.PushField(field.Alias)
 937	defer rctx.Pop()
 938	res := obj.TotalCount
 939	return graphql.MarshalInt(res)
 940}
 941
 942var commentEdgeImplementors = []string{"CommentEdge"}
 943
 944// nolint: gocyclo, errcheck, gas, goconst
 945func (ec *executionContext) _CommentEdge(ctx context.Context, sel []query.Selection, obj *models.CommentEdge) graphql.Marshaler {
 946	fields := graphql.CollectFields(ec.Doc, sel, commentEdgeImplementors, ec.Variables)
 947
 948	out := graphql.NewOrderedMap(len(fields))
 949	for i, field := range fields {
 950		out.Keys[i] = field.Alias
 951
 952		switch field.Name {
 953		case "__typename":
 954			out.Values[i] = graphql.MarshalString("CommentEdge")
 955		case "cursor":
 956			out.Values[i] = ec._CommentEdge_cursor(ctx, field, obj)
 957		case "node":
 958			out.Values[i] = ec._CommentEdge_node(ctx, field, obj)
 959		default:
 960			panic("unknown field " + strconv.Quote(field.Name))
 961		}
 962	}
 963
 964	return out
 965}
 966
 967func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler {
 968	rctx := graphql.GetResolverContext(ctx)
 969	rctx.Object = "CommentEdge"
 970	rctx.Args = nil
 971	rctx.Field = field
 972	rctx.PushField(field.Alias)
 973	defer rctx.Pop()
 974	res := obj.Cursor
 975	return graphql.MarshalString(res)
 976}
 977
 978func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler {
 979	rctx := graphql.GetResolverContext(ctx)
 980	rctx.Object = "CommentEdge"
 981	rctx.Args = nil
 982	rctx.Field = field
 983	rctx.PushField(field.Alias)
 984	defer rctx.Pop()
 985	res := obj.Node
 986	return ec._Comment(ctx, field.Selections, &res)
 987}
 988
 989var createOperationImplementors = []string{"CreateOperation", "Operation", "Authored"}
 990
 991// nolint: gocyclo, errcheck, gas, goconst
 992func (ec *executionContext) _CreateOperation(ctx context.Context, sel []query.Selection, obj *operations.CreateOperation) graphql.Marshaler {
 993	fields := graphql.CollectFields(ec.Doc, sel, createOperationImplementors, ec.Variables)
 994
 995	out := graphql.NewOrderedMap(len(fields))
 996	for i, field := range fields {
 997		out.Keys[i] = field.Alias
 998
 999		switch field.Name {
1000		case "__typename":
1001			out.Values[i] = graphql.MarshalString("CreateOperation")
1002		case "author":
1003			out.Values[i] = ec._CreateOperation_author(ctx, field, obj)
1004		case "date":
1005			out.Values[i] = ec._CreateOperation_date(ctx, field, obj)
1006		case "title":
1007			out.Values[i] = ec._CreateOperation_title(ctx, field, obj)
1008		case "message":
1009			out.Values[i] = ec._CreateOperation_message(ctx, field, obj)
1010		default:
1011			panic("unknown field " + strconv.Quote(field.Name))
1012		}
1013	}
1014
1015	return out
1016}
1017
1018func (ec *executionContext) _CreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.CreateOperation) graphql.Marshaler {
1019	rctx := graphql.GetResolverContext(ctx)
1020	rctx.Object = "CreateOperation"
1021	rctx.Args = nil
1022	rctx.Field = field
1023	rctx.PushField(field.Alias)
1024	defer rctx.Pop()
1025	res := obj.Author
1026	return ec._Person(ctx, field.Selections, &res)
1027}
1028
1029func (ec *executionContext) _CreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.CreateOperation) graphql.Marshaler {
1030	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1031		Object: "CreateOperation",
1032		Args:   nil,
1033		Field:  field,
1034	})
1035	return graphql.Defer(func() (ret graphql.Marshaler) {
1036		defer func() {
1037			if r := recover(); r != nil {
1038				userErr := ec.Recover(ctx, r)
1039				ec.Error(ctx, userErr)
1040				ret = graphql.Null
1041			}
1042		}()
1043
1044		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1045			return ec.resolvers.CreateOperation_date(ctx, obj)
1046		})
1047		if err != nil {
1048			ec.Error(ctx, err)
1049			return graphql.Null
1050		}
1051		if resTmp == nil {
1052			return graphql.Null
1053		}
1054		res := resTmp.(time.Time)
1055		return graphql.MarshalTime(res)
1056	})
1057}
1058
1059func (ec *executionContext) _CreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *operations.CreateOperation) graphql.Marshaler {
1060	rctx := graphql.GetResolverContext(ctx)
1061	rctx.Object = "CreateOperation"
1062	rctx.Args = nil
1063	rctx.Field = field
1064	rctx.PushField(field.Alias)
1065	defer rctx.Pop()
1066	res := obj.Title
1067	return graphql.MarshalString(res)
1068}
1069
1070func (ec *executionContext) _CreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *operations.CreateOperation) graphql.Marshaler {
1071	rctx := graphql.GetResolverContext(ctx)
1072	rctx.Object = "CreateOperation"
1073	rctx.Args = nil
1074	rctx.Field = field
1075	rctx.PushField(field.Alias)
1076	defer rctx.Pop()
1077	res := obj.Message
1078	return graphql.MarshalString(res)
1079}
1080
1081var labelChangeOperationImplementors = []string{"LabelChangeOperation", "Operation", "Authored"}
1082
1083// nolint: gocyclo, errcheck, gas, goconst
1084func (ec *executionContext) _LabelChangeOperation(ctx context.Context, sel []query.Selection, obj *operations.LabelChangeOperation) graphql.Marshaler {
1085	fields := graphql.CollectFields(ec.Doc, sel, labelChangeOperationImplementors, ec.Variables)
1086
1087	out := graphql.NewOrderedMap(len(fields))
1088	for i, field := range fields {
1089		out.Keys[i] = field.Alias
1090
1091		switch field.Name {
1092		case "__typename":
1093			out.Values[i] = graphql.MarshalString("LabelChangeOperation")
1094		case "author":
1095			out.Values[i] = ec._LabelChangeOperation_author(ctx, field, obj)
1096		case "date":
1097			out.Values[i] = ec._LabelChangeOperation_date(ctx, field, obj)
1098		case "added":
1099			out.Values[i] = ec._LabelChangeOperation_added(ctx, field, obj)
1100		case "removed":
1101			out.Values[i] = ec._LabelChangeOperation_removed(ctx, field, obj)
1102		default:
1103			panic("unknown field " + strconv.Quote(field.Name))
1104		}
1105	}
1106
1107	return out
1108}
1109
1110func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.LabelChangeOperation) graphql.Marshaler {
1111	rctx := graphql.GetResolverContext(ctx)
1112	rctx.Object = "LabelChangeOperation"
1113	rctx.Args = nil
1114	rctx.Field = field
1115	rctx.PushField(field.Alias)
1116	defer rctx.Pop()
1117	res := obj.Author
1118	return ec._Person(ctx, field.Selections, &res)
1119}
1120
1121func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.LabelChangeOperation) graphql.Marshaler {
1122	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1123		Object: "LabelChangeOperation",
1124		Args:   nil,
1125		Field:  field,
1126	})
1127	return graphql.Defer(func() (ret graphql.Marshaler) {
1128		defer func() {
1129			if r := recover(); r != nil {
1130				userErr := ec.Recover(ctx, r)
1131				ec.Error(ctx, userErr)
1132				ret = graphql.Null
1133			}
1134		}()
1135
1136		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1137			return ec.resolvers.LabelChangeOperation_date(ctx, obj)
1138		})
1139		if err != nil {
1140			ec.Error(ctx, err)
1141			return graphql.Null
1142		}
1143		if resTmp == nil {
1144			return graphql.Null
1145		}
1146		res := resTmp.(time.Time)
1147		return graphql.MarshalTime(res)
1148	})
1149}
1150
1151func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField, obj *operations.LabelChangeOperation) graphql.Marshaler {
1152	rctx := graphql.GetResolverContext(ctx)
1153	rctx.Object = "LabelChangeOperation"
1154	rctx.Args = nil
1155	rctx.Field = field
1156	rctx.PushField(field.Alias)
1157	defer rctx.Pop()
1158	res := obj.Added
1159	arr1 := graphql.Array{}
1160	for idx1 := range res {
1161		arr1 = append(arr1, func() graphql.Marshaler {
1162			rctx := graphql.GetResolverContext(ctx)
1163			rctx.PushIndex(idx1)
1164			defer rctx.Pop()
1165			return res[idx1]
1166		}())
1167	}
1168	return arr1
1169}
1170
1171func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *operations.LabelChangeOperation) graphql.Marshaler {
1172	rctx := graphql.GetResolverContext(ctx)
1173	rctx.Object = "LabelChangeOperation"
1174	rctx.Args = nil
1175	rctx.Field = field
1176	rctx.PushField(field.Alias)
1177	defer rctx.Pop()
1178	res := obj.Removed
1179	arr1 := graphql.Array{}
1180	for idx1 := range res {
1181		arr1 = append(arr1, func() graphql.Marshaler {
1182			rctx := graphql.GetResolverContext(ctx)
1183			rctx.PushIndex(idx1)
1184			defer rctx.Pop()
1185			return res[idx1]
1186		}())
1187	}
1188	return arr1
1189}
1190
1191var mutationImplementors = []string{"Mutation"}
1192
1193// nolint: gocyclo, errcheck, gas, goconst
1194func (ec *executionContext) _Mutation(ctx context.Context, sel []query.Selection) graphql.Marshaler {
1195	fields := graphql.CollectFields(ec.Doc, sel, mutationImplementors, ec.Variables)
1196
1197	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1198		Object: "Mutation",
1199	})
1200
1201	out := graphql.NewOrderedMap(len(fields))
1202	for i, field := range fields {
1203		out.Keys[i] = field.Alias
1204
1205		switch field.Name {
1206		case "__typename":
1207			out.Values[i] = graphql.MarshalString("Mutation")
1208		case "newBug":
1209			out.Values[i] = ec._Mutation_newBug(ctx, field)
1210		case "addComment":
1211			out.Values[i] = ec._Mutation_addComment(ctx, field)
1212		case "changeLabels":
1213			out.Values[i] = ec._Mutation_changeLabels(ctx, field)
1214		case "open":
1215			out.Values[i] = ec._Mutation_open(ctx, field)
1216		case "close":
1217			out.Values[i] = ec._Mutation_close(ctx, field)
1218		case "setTitle":
1219			out.Values[i] = ec._Mutation_setTitle(ctx, field)
1220		case "commit":
1221			out.Values[i] = ec._Mutation_commit(ctx, field)
1222		default:
1223			panic("unknown field " + strconv.Quote(field.Name))
1224		}
1225	}
1226
1227	return out
1228}
1229
1230func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1231	args := map[string]interface{}{}
1232	var arg0 *string
1233	if tmp, ok := field.Args["repoRef"]; ok {
1234		var err error
1235		var ptr1 string
1236		if tmp != nil {
1237			ptr1, err = graphql.UnmarshalString(tmp)
1238			arg0 = &ptr1
1239		}
1240
1241		if err != nil {
1242			ec.Error(ctx, err)
1243			return graphql.Null
1244		}
1245	}
1246	args["repoRef"] = arg0
1247	var arg1 string
1248	if tmp, ok := field.Args["title"]; ok {
1249		var err error
1250		arg1, err = graphql.UnmarshalString(tmp)
1251		if err != nil {
1252			ec.Error(ctx, err)
1253			return graphql.Null
1254		}
1255	}
1256	args["title"] = arg1
1257	var arg2 string
1258	if tmp, ok := field.Args["message"]; ok {
1259		var err error
1260		arg2, err = graphql.UnmarshalString(tmp)
1261		if err != nil {
1262			ec.Error(ctx, err)
1263			return graphql.Null
1264		}
1265	}
1266	args["message"] = arg2
1267	rctx := graphql.GetResolverContext(ctx)
1268	rctx.Object = "Mutation"
1269	rctx.Args = args
1270	rctx.Field = field
1271	rctx.PushField(field.Alias)
1272	defer rctx.Pop()
1273	resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1274		return ec.resolvers.Mutation_newBug(ctx, args["repoRef"].(*string), args["title"].(string), args["message"].(string))
1275	})
1276	if err != nil {
1277		ec.Error(ctx, err)
1278		return graphql.Null
1279	}
1280	if resTmp == nil {
1281		return graphql.Null
1282	}
1283	res := resTmp.(bug.Snapshot)
1284	return ec._Bug(ctx, field.Selections, &res)
1285}
1286
1287func (ec *executionContext) _Mutation_addComment(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1288	args := map[string]interface{}{}
1289	var arg0 *string
1290	if tmp, ok := field.Args["repoRef"]; ok {
1291		var err error
1292		var ptr1 string
1293		if tmp != nil {
1294			ptr1, err = graphql.UnmarshalString(tmp)
1295			arg0 = &ptr1
1296		}
1297
1298		if err != nil {
1299			ec.Error(ctx, err)
1300			return graphql.Null
1301		}
1302	}
1303	args["repoRef"] = arg0
1304	var arg1 string
1305	if tmp, ok := field.Args["prefix"]; ok {
1306		var err error
1307		arg1, err = graphql.UnmarshalString(tmp)
1308		if err != nil {
1309			ec.Error(ctx, err)
1310			return graphql.Null
1311		}
1312	}
1313	args["prefix"] = arg1
1314	var arg2 string
1315	if tmp, ok := field.Args["message"]; ok {
1316		var err error
1317		arg2, err = graphql.UnmarshalString(tmp)
1318		if err != nil {
1319			ec.Error(ctx, err)
1320			return graphql.Null
1321		}
1322	}
1323	args["message"] = arg2
1324	rctx := graphql.GetResolverContext(ctx)
1325	rctx.Object = "Mutation"
1326	rctx.Args = args
1327	rctx.Field = field
1328	rctx.PushField(field.Alias)
1329	defer rctx.Pop()
1330	resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1331		return ec.resolvers.Mutation_addComment(ctx, args["repoRef"].(*string), args["prefix"].(string), args["message"].(string))
1332	})
1333	if err != nil {
1334		ec.Error(ctx, err)
1335		return graphql.Null
1336	}
1337	if resTmp == nil {
1338		return graphql.Null
1339	}
1340	res := resTmp.(bug.Snapshot)
1341	return ec._Bug(ctx, field.Selections, &res)
1342}
1343
1344func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1345	args := map[string]interface{}{}
1346	var arg0 *string
1347	if tmp, ok := field.Args["repoRef"]; ok {
1348		var err error
1349		var ptr1 string
1350		if tmp != nil {
1351			ptr1, err = graphql.UnmarshalString(tmp)
1352			arg0 = &ptr1
1353		}
1354
1355		if err != nil {
1356			ec.Error(ctx, err)
1357			return graphql.Null
1358		}
1359	}
1360	args["repoRef"] = arg0
1361	var arg1 string
1362	if tmp, ok := field.Args["prefix"]; ok {
1363		var err error
1364		arg1, err = graphql.UnmarshalString(tmp)
1365		if err != nil {
1366			ec.Error(ctx, err)
1367			return graphql.Null
1368		}
1369	}
1370	args["prefix"] = arg1
1371	var arg2 []string
1372	if tmp, ok := field.Args["added"]; ok {
1373		var err error
1374		var rawIf1 []interface{}
1375		if tmp != nil {
1376			if tmp1, ok := tmp.([]interface{}); ok {
1377				rawIf1 = tmp1
1378			}
1379		}
1380		arg2 = make([]string, len(rawIf1))
1381		for idx1 := range rawIf1 {
1382			arg2[idx1], err = graphql.UnmarshalString(rawIf1[idx1])
1383		}
1384		if err != nil {
1385			ec.Error(ctx, err)
1386			return graphql.Null
1387		}
1388	}
1389	args["added"] = arg2
1390	var arg3 []string
1391	if tmp, ok := field.Args["removed"]; ok {
1392		var err error
1393		var rawIf1 []interface{}
1394		if tmp != nil {
1395			if tmp1, ok := tmp.([]interface{}); ok {
1396				rawIf1 = tmp1
1397			}
1398		}
1399		arg3 = make([]string, len(rawIf1))
1400		for idx1 := range rawIf1 {
1401			arg3[idx1], err = graphql.UnmarshalString(rawIf1[idx1])
1402		}
1403		if err != nil {
1404			ec.Error(ctx, err)
1405			return graphql.Null
1406		}
1407	}
1408	args["removed"] = arg3
1409	rctx := graphql.GetResolverContext(ctx)
1410	rctx.Object = "Mutation"
1411	rctx.Args = args
1412	rctx.Field = field
1413	rctx.PushField(field.Alias)
1414	defer rctx.Pop()
1415	resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1416		return ec.resolvers.Mutation_changeLabels(ctx, args["repoRef"].(*string), args["prefix"].(string), args["added"].([]string), args["removed"].([]string))
1417	})
1418	if err != nil {
1419		ec.Error(ctx, err)
1420		return graphql.Null
1421	}
1422	if resTmp == nil {
1423		return graphql.Null
1424	}
1425	res := resTmp.(bug.Snapshot)
1426	return ec._Bug(ctx, field.Selections, &res)
1427}
1428
1429func (ec *executionContext) _Mutation_open(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1430	args := map[string]interface{}{}
1431	var arg0 *string
1432	if tmp, ok := field.Args["repoRef"]; ok {
1433		var err error
1434		var ptr1 string
1435		if tmp != nil {
1436			ptr1, err = graphql.UnmarshalString(tmp)
1437			arg0 = &ptr1
1438		}
1439
1440		if err != nil {
1441			ec.Error(ctx, err)
1442			return graphql.Null
1443		}
1444	}
1445	args["repoRef"] = arg0
1446	var arg1 string
1447	if tmp, ok := field.Args["prefix"]; ok {
1448		var err error
1449		arg1, err = graphql.UnmarshalString(tmp)
1450		if err != nil {
1451			ec.Error(ctx, err)
1452			return graphql.Null
1453		}
1454	}
1455	args["prefix"] = arg1
1456	rctx := graphql.GetResolverContext(ctx)
1457	rctx.Object = "Mutation"
1458	rctx.Args = args
1459	rctx.Field = field
1460	rctx.PushField(field.Alias)
1461	defer rctx.Pop()
1462	resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1463		return ec.resolvers.Mutation_open(ctx, args["repoRef"].(*string), args["prefix"].(string))
1464	})
1465	if err != nil {
1466		ec.Error(ctx, err)
1467		return graphql.Null
1468	}
1469	if resTmp == nil {
1470		return graphql.Null
1471	}
1472	res := resTmp.(bug.Snapshot)
1473	return ec._Bug(ctx, field.Selections, &res)
1474}
1475
1476func (ec *executionContext) _Mutation_close(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1477	args := map[string]interface{}{}
1478	var arg0 *string
1479	if tmp, ok := field.Args["repoRef"]; ok {
1480		var err error
1481		var ptr1 string
1482		if tmp != nil {
1483			ptr1, err = graphql.UnmarshalString(tmp)
1484			arg0 = &ptr1
1485		}
1486
1487		if err != nil {
1488			ec.Error(ctx, err)
1489			return graphql.Null
1490		}
1491	}
1492	args["repoRef"] = arg0
1493	var arg1 string
1494	if tmp, ok := field.Args["prefix"]; ok {
1495		var err error
1496		arg1, err = graphql.UnmarshalString(tmp)
1497		if err != nil {
1498			ec.Error(ctx, err)
1499			return graphql.Null
1500		}
1501	}
1502	args["prefix"] = arg1
1503	rctx := graphql.GetResolverContext(ctx)
1504	rctx.Object = "Mutation"
1505	rctx.Args = args
1506	rctx.Field = field
1507	rctx.PushField(field.Alias)
1508	defer rctx.Pop()
1509	resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1510		return ec.resolvers.Mutation_close(ctx, args["repoRef"].(*string), args["prefix"].(string))
1511	})
1512	if err != nil {
1513		ec.Error(ctx, err)
1514		return graphql.Null
1515	}
1516	if resTmp == nil {
1517		return graphql.Null
1518	}
1519	res := resTmp.(bug.Snapshot)
1520	return ec._Bug(ctx, field.Selections, &res)
1521}
1522
1523func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1524	args := map[string]interface{}{}
1525	var arg0 *string
1526	if tmp, ok := field.Args["repoRef"]; ok {
1527		var err error
1528		var ptr1 string
1529		if tmp != nil {
1530			ptr1, err = graphql.UnmarshalString(tmp)
1531			arg0 = &ptr1
1532		}
1533
1534		if err != nil {
1535			ec.Error(ctx, err)
1536			return graphql.Null
1537		}
1538	}
1539	args["repoRef"] = arg0
1540	var arg1 string
1541	if tmp, ok := field.Args["prefix"]; ok {
1542		var err error
1543		arg1, err = graphql.UnmarshalString(tmp)
1544		if err != nil {
1545			ec.Error(ctx, err)
1546			return graphql.Null
1547		}
1548	}
1549	args["prefix"] = arg1
1550	var arg2 string
1551	if tmp, ok := field.Args["title"]; ok {
1552		var err error
1553		arg2, err = graphql.UnmarshalString(tmp)
1554		if err != nil {
1555			ec.Error(ctx, err)
1556			return graphql.Null
1557		}
1558	}
1559	args["title"] = arg2
1560	rctx := graphql.GetResolverContext(ctx)
1561	rctx.Object = "Mutation"
1562	rctx.Args = args
1563	rctx.Field = field
1564	rctx.PushField(field.Alias)
1565	defer rctx.Pop()
1566	resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1567		return ec.resolvers.Mutation_setTitle(ctx, args["repoRef"].(*string), args["prefix"].(string), args["title"].(string))
1568	})
1569	if err != nil {
1570		ec.Error(ctx, err)
1571		return graphql.Null
1572	}
1573	if resTmp == nil {
1574		return graphql.Null
1575	}
1576	res := resTmp.(bug.Snapshot)
1577	return ec._Bug(ctx, field.Selections, &res)
1578}
1579
1580func (ec *executionContext) _Mutation_commit(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1581	args := map[string]interface{}{}
1582	var arg0 *string
1583	if tmp, ok := field.Args["repoRef"]; ok {
1584		var err error
1585		var ptr1 string
1586		if tmp != nil {
1587			ptr1, err = graphql.UnmarshalString(tmp)
1588			arg0 = &ptr1
1589		}
1590
1591		if err != nil {
1592			ec.Error(ctx, err)
1593			return graphql.Null
1594		}
1595	}
1596	args["repoRef"] = arg0
1597	var arg1 string
1598	if tmp, ok := field.Args["prefix"]; ok {
1599		var err error
1600		arg1, err = graphql.UnmarshalString(tmp)
1601		if err != nil {
1602			ec.Error(ctx, err)
1603			return graphql.Null
1604		}
1605	}
1606	args["prefix"] = arg1
1607	rctx := graphql.GetResolverContext(ctx)
1608	rctx.Object = "Mutation"
1609	rctx.Args = args
1610	rctx.Field = field
1611	rctx.PushField(field.Alias)
1612	defer rctx.Pop()
1613	resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1614		return ec.resolvers.Mutation_commit(ctx, args["repoRef"].(*string), args["prefix"].(string))
1615	})
1616	if err != nil {
1617		ec.Error(ctx, err)
1618		return graphql.Null
1619	}
1620	if resTmp == nil {
1621		return graphql.Null
1622	}
1623	res := resTmp.(bug.Snapshot)
1624	return ec._Bug(ctx, field.Selections, &res)
1625}
1626
1627var operationConnectionImplementors = []string{"OperationConnection"}
1628
1629// nolint: gocyclo, errcheck, gas, goconst
1630func (ec *executionContext) _OperationConnection(ctx context.Context, sel []query.Selection, obj *models.OperationConnection) graphql.Marshaler {
1631	fields := graphql.CollectFields(ec.Doc, sel, operationConnectionImplementors, ec.Variables)
1632
1633	out := graphql.NewOrderedMap(len(fields))
1634	for i, field := range fields {
1635		out.Keys[i] = field.Alias
1636
1637		switch field.Name {
1638		case "__typename":
1639			out.Values[i] = graphql.MarshalString("OperationConnection")
1640		case "edges":
1641			out.Values[i] = ec._OperationConnection_edges(ctx, field, obj)
1642		case "nodes":
1643			out.Values[i] = ec._OperationConnection_nodes(ctx, field, obj)
1644		case "pageInfo":
1645			out.Values[i] = ec._OperationConnection_pageInfo(ctx, field, obj)
1646		case "totalCount":
1647			out.Values[i] = ec._OperationConnection_totalCount(ctx, field, obj)
1648		default:
1649			panic("unknown field " + strconv.Quote(field.Name))
1650		}
1651	}
1652
1653	return out
1654}
1655
1656func (ec *executionContext) _OperationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
1657	rctx := graphql.GetResolverContext(ctx)
1658	rctx.Object = "OperationConnection"
1659	rctx.Args = nil
1660	rctx.Field = field
1661	rctx.PushField(field.Alias)
1662	defer rctx.Pop()
1663	res := obj.Edges
1664	arr1 := graphql.Array{}
1665	for idx1 := range res {
1666		arr1 = append(arr1, func() graphql.Marshaler {
1667			rctx := graphql.GetResolverContext(ctx)
1668			rctx.PushIndex(idx1)
1669			defer rctx.Pop()
1670			return ec._OperationEdge(ctx, field.Selections, &res[idx1])
1671		}())
1672	}
1673	return arr1
1674}
1675
1676func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
1677	rctx := graphql.GetResolverContext(ctx)
1678	rctx.Object = "OperationConnection"
1679	rctx.Args = nil
1680	rctx.Field = field
1681	rctx.PushField(field.Alias)
1682	defer rctx.Pop()
1683	res := obj.Nodes
1684	arr1 := graphql.Array{}
1685	for idx1 := range res {
1686		arr1 = append(arr1, func() graphql.Marshaler {
1687			rctx := graphql.GetResolverContext(ctx)
1688			rctx.PushIndex(idx1)
1689			defer rctx.Pop()
1690			return ec._Operation(ctx, field.Selections, &res[idx1])
1691		}())
1692	}
1693	return arr1
1694}
1695
1696func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
1697	rctx := graphql.GetResolverContext(ctx)
1698	rctx.Object = "OperationConnection"
1699	rctx.Args = nil
1700	rctx.Field = field
1701	rctx.PushField(field.Alias)
1702	defer rctx.Pop()
1703	res := obj.PageInfo
1704	return ec._PageInfo(ctx, field.Selections, &res)
1705}
1706
1707func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
1708	rctx := graphql.GetResolverContext(ctx)
1709	rctx.Object = "OperationConnection"
1710	rctx.Args = nil
1711	rctx.Field = field
1712	rctx.PushField(field.Alias)
1713	defer rctx.Pop()
1714	res := obj.TotalCount
1715	return graphql.MarshalInt(res)
1716}
1717
1718var operationEdgeImplementors = []string{"OperationEdge"}
1719
1720// nolint: gocyclo, errcheck, gas, goconst
1721func (ec *executionContext) _OperationEdge(ctx context.Context, sel []query.Selection, obj *models.OperationEdge) graphql.Marshaler {
1722	fields := graphql.CollectFields(ec.Doc, sel, operationEdgeImplementors, ec.Variables)
1723
1724	out := graphql.NewOrderedMap(len(fields))
1725	for i, field := range fields {
1726		out.Keys[i] = field.Alias
1727
1728		switch field.Name {
1729		case "__typename":
1730			out.Values[i] = graphql.MarshalString("OperationEdge")
1731		case "cursor":
1732			out.Values[i] = ec._OperationEdge_cursor(ctx, field, obj)
1733		case "node":
1734			out.Values[i] = ec._OperationEdge_node(ctx, field, obj)
1735		default:
1736			panic("unknown field " + strconv.Quote(field.Name))
1737		}
1738	}
1739
1740	return out
1741}
1742
1743func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler {
1744	rctx := graphql.GetResolverContext(ctx)
1745	rctx.Object = "OperationEdge"
1746	rctx.Args = nil
1747	rctx.Field = field
1748	rctx.PushField(field.Alias)
1749	defer rctx.Pop()
1750	res := obj.Cursor
1751	return graphql.MarshalString(res)
1752}
1753
1754func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler {
1755	rctx := graphql.GetResolverContext(ctx)
1756	rctx.Object = "OperationEdge"
1757	rctx.Args = nil
1758	rctx.Field = field
1759	rctx.PushField(field.Alias)
1760	defer rctx.Pop()
1761	res := obj.Node
1762	return ec._Operation(ctx, field.Selections, &res)
1763}
1764
1765var pageInfoImplementors = []string{"PageInfo"}
1766
1767// nolint: gocyclo, errcheck, gas, goconst
1768func (ec *executionContext) _PageInfo(ctx context.Context, sel []query.Selection, obj *models.PageInfo) graphql.Marshaler {
1769	fields := graphql.CollectFields(ec.Doc, sel, pageInfoImplementors, ec.Variables)
1770
1771	out := graphql.NewOrderedMap(len(fields))
1772	for i, field := range fields {
1773		out.Keys[i] = field.Alias
1774
1775		switch field.Name {
1776		case "__typename":
1777			out.Values[i] = graphql.MarshalString("PageInfo")
1778		case "hasNextPage":
1779			out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj)
1780		case "hasPreviousPage":
1781			out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj)
1782		default:
1783			panic("unknown field " + strconv.Quote(field.Name))
1784		}
1785	}
1786
1787	return out
1788}
1789
1790func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
1791	rctx := graphql.GetResolverContext(ctx)
1792	rctx.Object = "PageInfo"
1793	rctx.Args = nil
1794	rctx.Field = field
1795	rctx.PushField(field.Alias)
1796	defer rctx.Pop()
1797	res := obj.HasNextPage
1798	return graphql.MarshalBoolean(res)
1799}
1800
1801func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
1802	rctx := graphql.GetResolverContext(ctx)
1803	rctx.Object = "PageInfo"
1804	rctx.Args = nil
1805	rctx.Field = field
1806	rctx.PushField(field.Alias)
1807	defer rctx.Pop()
1808	res := obj.HasPreviousPage
1809	return graphql.MarshalBoolean(res)
1810}
1811
1812var personImplementors = []string{"Person"}
1813
1814// nolint: gocyclo, errcheck, gas, goconst
1815func (ec *executionContext) _Person(ctx context.Context, sel []query.Selection, obj *bug.Person) graphql.Marshaler {
1816	fields := graphql.CollectFields(ec.Doc, sel, personImplementors, ec.Variables)
1817
1818	out := graphql.NewOrderedMap(len(fields))
1819	for i, field := range fields {
1820		out.Keys[i] = field.Alias
1821
1822		switch field.Name {
1823		case "__typename":
1824			out.Values[i] = graphql.MarshalString("Person")
1825		case "email":
1826			out.Values[i] = ec._Person_email(ctx, field, obj)
1827		case "name":
1828			out.Values[i] = ec._Person_name(ctx, field, obj)
1829		default:
1830			panic("unknown field " + strconv.Quote(field.Name))
1831		}
1832	}
1833
1834	return out
1835}
1836
1837func (ec *executionContext) _Person_email(ctx context.Context, field graphql.CollectedField, obj *bug.Person) graphql.Marshaler {
1838	rctx := graphql.GetResolverContext(ctx)
1839	rctx.Object = "Person"
1840	rctx.Args = nil
1841	rctx.Field = field
1842	rctx.PushField(field.Alias)
1843	defer rctx.Pop()
1844	res := obj.Email
1845	return graphql.MarshalString(res)
1846}
1847
1848func (ec *executionContext) _Person_name(ctx context.Context, field graphql.CollectedField, obj *bug.Person) graphql.Marshaler {
1849	rctx := graphql.GetResolverContext(ctx)
1850	rctx.Object = "Person"
1851	rctx.Args = nil
1852	rctx.Field = field
1853	rctx.PushField(field.Alias)
1854	defer rctx.Pop()
1855	res := obj.Name
1856	return graphql.MarshalString(res)
1857}
1858
1859var queryImplementors = []string{"Query"}
1860
1861// nolint: gocyclo, errcheck, gas, goconst
1862func (ec *executionContext) _Query(ctx context.Context, sel []query.Selection) graphql.Marshaler {
1863	fields := graphql.CollectFields(ec.Doc, sel, queryImplementors, ec.Variables)
1864
1865	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1866		Object: "Query",
1867	})
1868
1869	out := graphql.NewOrderedMap(len(fields))
1870	for i, field := range fields {
1871		out.Keys[i] = field.Alias
1872
1873		switch field.Name {
1874		case "__typename":
1875			out.Values[i] = graphql.MarshalString("Query")
1876		case "defaultRepository":
1877			out.Values[i] = ec._Query_defaultRepository(ctx, field)
1878		case "repository":
1879			out.Values[i] = ec._Query_repository(ctx, field)
1880		case "__schema":
1881			out.Values[i] = ec._Query___schema(ctx, field)
1882		case "__type":
1883			out.Values[i] = ec._Query___type(ctx, field)
1884		default:
1885			panic("unknown field " + strconv.Quote(field.Name))
1886		}
1887	}
1888
1889	return out
1890}
1891
1892func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1893	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1894		Object: "Query",
1895		Args:   nil,
1896		Field:  field,
1897	})
1898	return graphql.Defer(func() (ret graphql.Marshaler) {
1899		defer func() {
1900			if r := recover(); r != nil {
1901				userErr := ec.Recover(ctx, r)
1902				ec.Error(ctx, userErr)
1903				ret = graphql.Null
1904			}
1905		}()
1906
1907		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1908			return ec.resolvers.Query_defaultRepository(ctx)
1909		})
1910		if err != nil {
1911			ec.Error(ctx, err)
1912			return graphql.Null
1913		}
1914		if resTmp == nil {
1915			return graphql.Null
1916		}
1917		res := resTmp.(*models.Repository)
1918		if res == nil {
1919			return graphql.Null
1920		}
1921		return ec._Repository(ctx, field.Selections, res)
1922	})
1923}
1924
1925func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1926	args := map[string]interface{}{}
1927	var arg0 string
1928	if tmp, ok := field.Args["id"]; ok {
1929		var err error
1930		arg0, err = graphql.UnmarshalString(tmp)
1931		if err != nil {
1932			ec.Error(ctx, err)
1933			return graphql.Null
1934		}
1935	}
1936	args["id"] = arg0
1937	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
1938		Object: "Query",
1939		Args:   args,
1940		Field:  field,
1941	})
1942	return graphql.Defer(func() (ret graphql.Marshaler) {
1943		defer func() {
1944			if r := recover(); r != nil {
1945				userErr := ec.Recover(ctx, r)
1946				ec.Error(ctx, userErr)
1947				ret = graphql.Null
1948			}
1949		}()
1950
1951		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
1952			return ec.resolvers.Query_repository(ctx, args["id"].(string))
1953		})
1954		if err != nil {
1955			ec.Error(ctx, err)
1956			return graphql.Null
1957		}
1958		if resTmp == nil {
1959			return graphql.Null
1960		}
1961		res := resTmp.(*models.Repository)
1962		if res == nil {
1963			return graphql.Null
1964		}
1965		return ec._Repository(ctx, field.Selections, res)
1966	})
1967}
1968
1969func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1970	rctx := graphql.GetResolverContext(ctx)
1971	rctx.Object = "Query"
1972	rctx.Args = nil
1973	rctx.Field = field
1974	rctx.PushField(field.Alias)
1975	defer rctx.Pop()
1976	res := ec.introspectSchema()
1977	if res == nil {
1978		return graphql.Null
1979	}
1980	return ec.___Schema(ctx, field.Selections, res)
1981}
1982
1983func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
1984	args := map[string]interface{}{}
1985	var arg0 string
1986	if tmp, ok := field.Args["name"]; ok {
1987		var err error
1988		arg0, err = graphql.UnmarshalString(tmp)
1989		if err != nil {
1990			ec.Error(ctx, err)
1991			return graphql.Null
1992		}
1993	}
1994	args["name"] = arg0
1995	rctx := graphql.GetResolverContext(ctx)
1996	rctx.Object = "Query"
1997	rctx.Args = args
1998	rctx.Field = field
1999	rctx.PushField(field.Alias)
2000	defer rctx.Pop()
2001	res := ec.introspectType(args["name"].(string))
2002	if res == nil {
2003		return graphql.Null
2004	}
2005	return ec.___Type(ctx, field.Selections, res)
2006}
2007
2008var repositoryImplementors = []string{"Repository"}
2009
2010// nolint: gocyclo, errcheck, gas, goconst
2011func (ec *executionContext) _Repository(ctx context.Context, sel []query.Selection, obj *models.Repository) graphql.Marshaler {
2012	fields := graphql.CollectFields(ec.Doc, sel, repositoryImplementors, ec.Variables)
2013
2014	out := graphql.NewOrderedMap(len(fields))
2015	for i, field := range fields {
2016		out.Keys[i] = field.Alias
2017
2018		switch field.Name {
2019		case "__typename":
2020			out.Values[i] = graphql.MarshalString("Repository")
2021		case "allBugs":
2022			out.Values[i] = ec._Repository_allBugs(ctx, field, obj)
2023		case "bug":
2024			out.Values[i] = ec._Repository_bug(ctx, field, obj)
2025		default:
2026			panic("unknown field " + strconv.Quote(field.Name))
2027		}
2028	}
2029
2030	return out
2031}
2032
2033func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
2034	args := map[string]interface{}{}
2035	var arg0 *string
2036	if tmp, ok := field.Args["after"]; ok {
2037		var err error
2038		var ptr1 string
2039		if tmp != nil {
2040			ptr1, err = graphql.UnmarshalString(tmp)
2041			arg0 = &ptr1
2042		}
2043
2044		if err != nil {
2045			ec.Error(ctx, err)
2046			return graphql.Null
2047		}
2048	}
2049	args["after"] = arg0
2050	var arg1 *string
2051	if tmp, ok := field.Args["before"]; ok {
2052		var err error
2053		var ptr1 string
2054		if tmp != nil {
2055			ptr1, err = graphql.UnmarshalString(tmp)
2056			arg1 = &ptr1
2057		}
2058
2059		if err != nil {
2060			ec.Error(ctx, err)
2061			return graphql.Null
2062		}
2063	}
2064	args["before"] = arg1
2065	var arg2 *int
2066	if tmp, ok := field.Args["first"]; ok {
2067		var err error
2068		var ptr1 int
2069		if tmp != nil {
2070			ptr1, err = graphql.UnmarshalInt(tmp)
2071			arg2 = &ptr1
2072		}
2073
2074		if err != nil {
2075			ec.Error(ctx, err)
2076			return graphql.Null
2077		}
2078	}
2079	args["first"] = arg2
2080	var arg3 *int
2081	if tmp, ok := field.Args["last"]; ok {
2082		var err error
2083		var ptr1 int
2084		if tmp != nil {
2085			ptr1, err = graphql.UnmarshalInt(tmp)
2086			arg3 = &ptr1
2087		}
2088
2089		if err != nil {
2090			ec.Error(ctx, err)
2091			return graphql.Null
2092		}
2093	}
2094	args["last"] = arg3
2095	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
2096		Object: "Repository",
2097		Args:   args,
2098		Field:  field,
2099	})
2100	return graphql.Defer(func() (ret graphql.Marshaler) {
2101		defer func() {
2102			if r := recover(); r != nil {
2103				userErr := ec.Recover(ctx, r)
2104				ec.Error(ctx, userErr)
2105				ret = graphql.Null
2106			}
2107		}()
2108
2109		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
2110			return ec.resolvers.Repository_allBugs(ctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
2111		})
2112		if err != nil {
2113			ec.Error(ctx, err)
2114			return graphql.Null
2115		}
2116		if resTmp == nil {
2117			return graphql.Null
2118		}
2119		res := resTmp.(models.BugConnection)
2120		return ec._BugConnection(ctx, field.Selections, &res)
2121	})
2122}
2123
2124func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
2125	args := map[string]interface{}{}
2126	var arg0 string
2127	if tmp, ok := field.Args["prefix"]; ok {
2128		var err error
2129		arg0, err = graphql.UnmarshalString(tmp)
2130		if err != nil {
2131			ec.Error(ctx, err)
2132			return graphql.Null
2133		}
2134	}
2135	args["prefix"] = arg0
2136	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
2137		Object: "Repository",
2138		Args:   args,
2139		Field:  field,
2140	})
2141	return graphql.Defer(func() (ret graphql.Marshaler) {
2142		defer func() {
2143			if r := recover(); r != nil {
2144				userErr := ec.Recover(ctx, r)
2145				ec.Error(ctx, userErr)
2146				ret = graphql.Null
2147			}
2148		}()
2149
2150		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
2151			return ec.resolvers.Repository_bug(ctx, obj, args["prefix"].(string))
2152		})
2153		if err != nil {
2154			ec.Error(ctx, err)
2155			return graphql.Null
2156		}
2157		if resTmp == nil {
2158			return graphql.Null
2159		}
2160		res := resTmp.(*bug.Snapshot)
2161		if res == nil {
2162			return graphql.Null
2163		}
2164		return ec._Bug(ctx, field.Selections, res)
2165	})
2166}
2167
2168var setStatusOperationImplementors = []string{"SetStatusOperation", "Operation", "Authored"}
2169
2170// nolint: gocyclo, errcheck, gas, goconst
2171func (ec *executionContext) _SetStatusOperation(ctx context.Context, sel []query.Selection, obj *operations.SetStatusOperation) graphql.Marshaler {
2172	fields := graphql.CollectFields(ec.Doc, sel, setStatusOperationImplementors, ec.Variables)
2173
2174	out := graphql.NewOrderedMap(len(fields))
2175	for i, field := range fields {
2176		out.Keys[i] = field.Alias
2177
2178		switch field.Name {
2179		case "__typename":
2180			out.Values[i] = graphql.MarshalString("SetStatusOperation")
2181		case "author":
2182			out.Values[i] = ec._SetStatusOperation_author(ctx, field, obj)
2183		case "date":
2184			out.Values[i] = ec._SetStatusOperation_date(ctx, field, obj)
2185		case "status":
2186			out.Values[i] = ec._SetStatusOperation_status(ctx, field, obj)
2187		default:
2188			panic("unknown field " + strconv.Quote(field.Name))
2189		}
2190	}
2191
2192	return out
2193}
2194
2195func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.SetStatusOperation) graphql.Marshaler {
2196	rctx := graphql.GetResolverContext(ctx)
2197	rctx.Object = "SetStatusOperation"
2198	rctx.Args = nil
2199	rctx.Field = field
2200	rctx.PushField(field.Alias)
2201	defer rctx.Pop()
2202	res := obj.Author
2203	return ec._Person(ctx, field.Selections, &res)
2204}
2205
2206func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.SetStatusOperation) graphql.Marshaler {
2207	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
2208		Object: "SetStatusOperation",
2209		Args:   nil,
2210		Field:  field,
2211	})
2212	return graphql.Defer(func() (ret graphql.Marshaler) {
2213		defer func() {
2214			if r := recover(); r != nil {
2215				userErr := ec.Recover(ctx, r)
2216				ec.Error(ctx, userErr)
2217				ret = graphql.Null
2218			}
2219		}()
2220
2221		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
2222			return ec.resolvers.SetStatusOperation_date(ctx, obj)
2223		})
2224		if err != nil {
2225			ec.Error(ctx, err)
2226			return graphql.Null
2227		}
2228		if resTmp == nil {
2229			return graphql.Null
2230		}
2231		res := resTmp.(time.Time)
2232		return graphql.MarshalTime(res)
2233	})
2234}
2235
2236func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *operations.SetStatusOperation) graphql.Marshaler {
2237	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
2238		Object: "SetStatusOperation",
2239		Args:   nil,
2240		Field:  field,
2241	})
2242	return graphql.Defer(func() (ret graphql.Marshaler) {
2243		defer func() {
2244			if r := recover(); r != nil {
2245				userErr := ec.Recover(ctx, r)
2246				ec.Error(ctx, userErr)
2247				ret = graphql.Null
2248			}
2249		}()
2250
2251		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
2252			return ec.resolvers.SetStatusOperation_status(ctx, obj)
2253		})
2254		if err != nil {
2255			ec.Error(ctx, err)
2256			return graphql.Null
2257		}
2258		if resTmp == nil {
2259			return graphql.Null
2260		}
2261		res := resTmp.(models.Status)
2262		return res
2263	})
2264}
2265
2266var setTitleOperationImplementors = []string{"SetTitleOperation", "Operation", "Authored"}
2267
2268// nolint: gocyclo, errcheck, gas, goconst
2269func (ec *executionContext) _SetTitleOperation(ctx context.Context, sel []query.Selection, obj *operations.SetTitleOperation) graphql.Marshaler {
2270	fields := graphql.CollectFields(ec.Doc, sel, setTitleOperationImplementors, ec.Variables)
2271
2272	out := graphql.NewOrderedMap(len(fields))
2273	for i, field := range fields {
2274		out.Keys[i] = field.Alias
2275
2276		switch field.Name {
2277		case "__typename":
2278			out.Values[i] = graphql.MarshalString("SetTitleOperation")
2279		case "author":
2280			out.Values[i] = ec._SetTitleOperation_author(ctx, field, obj)
2281		case "date":
2282			out.Values[i] = ec._SetTitleOperation_date(ctx, field, obj)
2283		case "title":
2284			out.Values[i] = ec._SetTitleOperation_title(ctx, field, obj)
2285		default:
2286			panic("unknown field " + strconv.Quote(field.Name))
2287		}
2288	}
2289
2290	return out
2291}
2292
2293func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *operations.SetTitleOperation) graphql.Marshaler {
2294	rctx := graphql.GetResolverContext(ctx)
2295	rctx.Object = "SetTitleOperation"
2296	rctx.Args = nil
2297	rctx.Field = field
2298	rctx.PushField(field.Alias)
2299	defer rctx.Pop()
2300	res := obj.Author
2301	return ec._Person(ctx, field.Selections, &res)
2302}
2303
2304func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *operations.SetTitleOperation) graphql.Marshaler {
2305	ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{
2306		Object: "SetTitleOperation",
2307		Args:   nil,
2308		Field:  field,
2309	})
2310	return graphql.Defer(func() (ret graphql.Marshaler) {
2311		defer func() {
2312			if r := recover(); r != nil {
2313				userErr := ec.Recover(ctx, r)
2314				ec.Error(ctx, userErr)
2315				ret = graphql.Null
2316			}
2317		}()
2318
2319		resTmp, err := ec.ResolverMiddleware(ctx, func(ctx context.Context) (interface{}, error) {
2320			return ec.resolvers.SetTitleOperation_date(ctx, obj)
2321		})
2322		if err != nil {
2323			ec.Error(ctx, err)
2324			return graphql.Null
2325		}
2326		if resTmp == nil {
2327			return graphql.Null
2328		}
2329		res := resTmp.(time.Time)
2330		return graphql.MarshalTime(res)
2331	})
2332}
2333
2334func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *operations.SetTitleOperation) graphql.Marshaler {
2335	rctx := graphql.GetResolverContext(ctx)
2336	rctx.Object = "SetTitleOperation"
2337	rctx.Args = nil
2338	rctx.Field = field
2339	rctx.PushField(field.Alias)
2340	defer rctx.Pop()
2341	res := obj.Title
2342	return graphql.MarshalString(res)
2343}
2344
2345var __DirectiveImplementors = []string{"__Directive"}
2346
2347// nolint: gocyclo, errcheck, gas, goconst
2348func (ec *executionContext) ___Directive(ctx context.Context, sel []query.Selection, obj *introspection.Directive) graphql.Marshaler {
2349	fields := graphql.CollectFields(ec.Doc, sel, __DirectiveImplementors, ec.Variables)
2350
2351	out := graphql.NewOrderedMap(len(fields))
2352	for i, field := range fields {
2353		out.Keys[i] = field.Alias
2354
2355		switch field.Name {
2356		case "__typename":
2357			out.Values[i] = graphql.MarshalString("__Directive")
2358		case "name":
2359			out.Values[i] = ec.___Directive_name(ctx, field, obj)
2360		case "description":
2361			out.Values[i] = ec.___Directive_description(ctx, field, obj)
2362		case "locations":
2363			out.Values[i] = ec.___Directive_locations(ctx, field, obj)
2364		case "args":
2365			out.Values[i] = ec.___Directive_args(ctx, field, obj)
2366		default:
2367			panic("unknown field " + strconv.Quote(field.Name))
2368		}
2369	}
2370
2371	return out
2372}
2373
2374func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
2375	rctx := graphql.GetResolverContext(ctx)
2376	rctx.Object = "__Directive"
2377	rctx.Args = nil
2378	rctx.Field = field
2379	rctx.PushField(field.Alias)
2380	defer rctx.Pop()
2381	res := obj.Name()
2382	return graphql.MarshalString(res)
2383}
2384
2385func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
2386	rctx := graphql.GetResolverContext(ctx)
2387	rctx.Object = "__Directive"
2388	rctx.Args = nil
2389	rctx.Field = field
2390	rctx.PushField(field.Alias)
2391	defer rctx.Pop()
2392	res := obj.Description()
2393	if res == nil {
2394		return graphql.Null
2395	}
2396	return graphql.MarshalString(*res)
2397}
2398
2399func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
2400	rctx := graphql.GetResolverContext(ctx)
2401	rctx.Object = "__Directive"
2402	rctx.Args = nil
2403	rctx.Field = field
2404	rctx.PushField(field.Alias)
2405	defer rctx.Pop()
2406	res := obj.Locations()
2407	arr1 := graphql.Array{}
2408	for idx1 := range res {
2409		arr1 = append(arr1, func() graphql.Marshaler {
2410			rctx := graphql.GetResolverContext(ctx)
2411			rctx.PushIndex(idx1)
2412			defer rctx.Pop()
2413			return graphql.MarshalString(res[idx1])
2414		}())
2415	}
2416	return arr1
2417}
2418
2419func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
2420	rctx := graphql.GetResolverContext(ctx)
2421	rctx.Object = "__Directive"
2422	rctx.Args = nil
2423	rctx.Field = field
2424	rctx.PushField(field.Alias)
2425	defer rctx.Pop()
2426	res := obj.Args()
2427	arr1 := graphql.Array{}
2428	for idx1 := range res {
2429		arr1 = append(arr1, func() graphql.Marshaler {
2430			rctx := graphql.GetResolverContext(ctx)
2431			rctx.PushIndex(idx1)
2432			defer rctx.Pop()
2433			return ec.___InputValue(ctx, field.Selections, &res[idx1])
2434		}())
2435	}
2436	return arr1
2437}
2438
2439var __EnumValueImplementors = []string{"__EnumValue"}
2440
2441// nolint: gocyclo, errcheck, gas, goconst
2442func (ec *executionContext) ___EnumValue(ctx context.Context, sel []query.Selection, obj *introspection.EnumValue) graphql.Marshaler {
2443	fields := graphql.CollectFields(ec.Doc, sel, __EnumValueImplementors, ec.Variables)
2444
2445	out := graphql.NewOrderedMap(len(fields))
2446	for i, field := range fields {
2447		out.Keys[i] = field.Alias
2448
2449		switch field.Name {
2450		case "__typename":
2451			out.Values[i] = graphql.MarshalString("__EnumValue")
2452		case "name":
2453			out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
2454		case "description":
2455			out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
2456		case "isDeprecated":
2457			out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
2458		case "deprecationReason":
2459			out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
2460		default:
2461			panic("unknown field " + strconv.Quote(field.Name))
2462		}
2463	}
2464
2465	return out
2466}
2467
2468func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
2469	rctx := graphql.GetResolverContext(ctx)
2470	rctx.Object = "__EnumValue"
2471	rctx.Args = nil
2472	rctx.Field = field
2473	rctx.PushField(field.Alias)
2474	defer rctx.Pop()
2475	res := obj.Name()
2476	return graphql.MarshalString(res)
2477}
2478
2479func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
2480	rctx := graphql.GetResolverContext(ctx)
2481	rctx.Object = "__EnumValue"
2482	rctx.Args = nil
2483	rctx.Field = field
2484	rctx.PushField(field.Alias)
2485	defer rctx.Pop()
2486	res := obj.Description()
2487	if res == nil {
2488		return graphql.Null
2489	}
2490	return graphql.MarshalString(*res)
2491}
2492
2493func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
2494	rctx := graphql.GetResolverContext(ctx)
2495	rctx.Object = "__EnumValue"
2496	rctx.Args = nil
2497	rctx.Field = field
2498	rctx.PushField(field.Alias)
2499	defer rctx.Pop()
2500	res := obj.IsDeprecated()
2501	return graphql.MarshalBoolean(res)
2502}
2503
2504func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
2505	rctx := graphql.GetResolverContext(ctx)
2506	rctx.Object = "__EnumValue"
2507	rctx.Args = nil
2508	rctx.Field = field
2509	rctx.PushField(field.Alias)
2510	defer rctx.Pop()
2511	res := obj.DeprecationReason()
2512	if res == nil {
2513		return graphql.Null
2514	}
2515	return graphql.MarshalString(*res)
2516}
2517
2518var __FieldImplementors = []string{"__Field"}
2519
2520// nolint: gocyclo, errcheck, gas, goconst
2521func (ec *executionContext) ___Field(ctx context.Context, sel []query.Selection, obj *introspection.Field) graphql.Marshaler {
2522	fields := graphql.CollectFields(ec.Doc, sel, __FieldImplementors, ec.Variables)
2523
2524	out := graphql.NewOrderedMap(len(fields))
2525	for i, field := range fields {
2526		out.Keys[i] = field.Alias
2527
2528		switch field.Name {
2529		case "__typename":
2530			out.Values[i] = graphql.MarshalString("__Field")
2531		case "name":
2532			out.Values[i] = ec.___Field_name(ctx, field, obj)
2533		case "description":
2534			out.Values[i] = ec.___Field_description(ctx, field, obj)
2535		case "args":
2536			out.Values[i] = ec.___Field_args(ctx, field, obj)
2537		case "type":
2538			out.Values[i] = ec.___Field_type(ctx, field, obj)
2539		case "isDeprecated":
2540			out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
2541		case "deprecationReason":
2542			out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
2543		default:
2544			panic("unknown field " + strconv.Quote(field.Name))
2545		}
2546	}
2547
2548	return out
2549}
2550
2551func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
2552	rctx := graphql.GetResolverContext(ctx)
2553	rctx.Object = "__Field"
2554	rctx.Args = nil
2555	rctx.Field = field
2556	rctx.PushField(field.Alias)
2557	defer rctx.Pop()
2558	res := obj.Name()
2559	return graphql.MarshalString(res)
2560}
2561
2562func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
2563	rctx := graphql.GetResolverContext(ctx)
2564	rctx.Object = "__Field"
2565	rctx.Args = nil
2566	rctx.Field = field
2567	rctx.PushField(field.Alias)
2568	defer rctx.Pop()
2569	res := obj.Description()
2570	if res == nil {
2571		return graphql.Null
2572	}
2573	return graphql.MarshalString(*res)
2574}
2575
2576func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
2577	rctx := graphql.GetResolverContext(ctx)
2578	rctx.Object = "__Field"
2579	rctx.Args = nil
2580	rctx.Field = field
2581	rctx.PushField(field.Alias)
2582	defer rctx.Pop()
2583	res := obj.Args()
2584	arr1 := graphql.Array{}
2585	for idx1 := range res {
2586		arr1 = append(arr1, func() graphql.Marshaler {
2587			rctx := graphql.GetResolverContext(ctx)
2588			rctx.PushIndex(idx1)
2589			defer rctx.Pop()
2590			return ec.___InputValue(ctx, field.Selections, &res[idx1])
2591		}())
2592	}
2593	return arr1
2594}
2595
2596func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
2597	rctx := graphql.GetResolverContext(ctx)
2598	rctx.Object = "__Field"
2599	rctx.Args = nil
2600	rctx.Field = field
2601	rctx.PushField(field.Alias)
2602	defer rctx.Pop()
2603	res := obj.Type()
2604	return ec.___Type(ctx, field.Selections, &res)
2605}
2606
2607func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
2608	rctx := graphql.GetResolverContext(ctx)
2609	rctx.Object = "__Field"
2610	rctx.Args = nil
2611	rctx.Field = field
2612	rctx.PushField(field.Alias)
2613	defer rctx.Pop()
2614	res := obj.IsDeprecated()
2615	return graphql.MarshalBoolean(res)
2616}
2617
2618func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
2619	rctx := graphql.GetResolverContext(ctx)
2620	rctx.Object = "__Field"
2621	rctx.Args = nil
2622	rctx.Field = field
2623	rctx.PushField(field.Alias)
2624	defer rctx.Pop()
2625	res := obj.DeprecationReason()
2626	if res == nil {
2627		return graphql.Null
2628	}
2629	return graphql.MarshalString(*res)
2630}
2631
2632var __InputValueImplementors = []string{"__InputValue"}
2633
2634// nolint: gocyclo, errcheck, gas, goconst
2635func (ec *executionContext) ___InputValue(ctx context.Context, sel []query.Selection, obj *introspection.InputValue) graphql.Marshaler {
2636	fields := graphql.CollectFields(ec.Doc, sel, __InputValueImplementors, ec.Variables)
2637
2638	out := graphql.NewOrderedMap(len(fields))
2639	for i, field := range fields {
2640		out.Keys[i] = field.Alias
2641
2642		switch field.Name {
2643		case "__typename":
2644			out.Values[i] = graphql.MarshalString("__InputValue")
2645		case "name":
2646			out.Values[i] = ec.___InputValue_name(ctx, field, obj)
2647		case "description":
2648			out.Values[i] = ec.___InputValue_description(ctx, field, obj)
2649		case "type":
2650			out.Values[i] = ec.___InputValue_type(ctx, field, obj)
2651		case "defaultValue":
2652			out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
2653		default:
2654			panic("unknown field " + strconv.Quote(field.Name))
2655		}
2656	}
2657
2658	return out
2659}
2660
2661func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
2662	rctx := graphql.GetResolverContext(ctx)
2663	rctx.Object = "__InputValue"
2664	rctx.Args = nil
2665	rctx.Field = field
2666	rctx.PushField(field.Alias)
2667	defer rctx.Pop()
2668	res := obj.Name()
2669	return graphql.MarshalString(res)
2670}
2671
2672func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
2673	rctx := graphql.GetResolverContext(ctx)
2674	rctx.Object = "__InputValue"
2675	rctx.Args = nil
2676	rctx.Field = field
2677	rctx.PushField(field.Alias)
2678	defer rctx.Pop()
2679	res := obj.Description()
2680	if res == nil {
2681		return graphql.Null
2682	}
2683	return graphql.MarshalString(*res)
2684}
2685
2686func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
2687	rctx := graphql.GetResolverContext(ctx)
2688	rctx.Object = "__InputValue"
2689	rctx.Args = nil
2690	rctx.Field = field
2691	rctx.PushField(field.Alias)
2692	defer rctx.Pop()
2693	res := obj.Type()
2694	return ec.___Type(ctx, field.Selections, &res)
2695}
2696
2697func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
2698	rctx := graphql.GetResolverContext(ctx)
2699	rctx.Object = "__InputValue"
2700	rctx.Args = nil
2701	rctx.Field = field
2702	rctx.PushField(field.Alias)
2703	defer rctx.Pop()
2704	res := obj.DefaultValue()
2705	if res == nil {
2706		return graphql.Null
2707	}
2708	return graphql.MarshalString(*res)
2709}
2710
2711var __SchemaImplementors = []string{"__Schema"}
2712
2713// nolint: gocyclo, errcheck, gas, goconst
2714func (ec *executionContext) ___Schema(ctx context.Context, sel []query.Selection, obj *introspection.Schema) graphql.Marshaler {
2715	fields := graphql.CollectFields(ec.Doc, sel, __SchemaImplementors, ec.Variables)
2716
2717	out := graphql.NewOrderedMap(len(fields))
2718	for i, field := range fields {
2719		out.Keys[i] = field.Alias
2720
2721		switch field.Name {
2722		case "__typename":
2723			out.Values[i] = graphql.MarshalString("__Schema")
2724		case "types":
2725			out.Values[i] = ec.___Schema_types(ctx, field, obj)
2726		case "queryType":
2727			out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
2728		case "mutationType":
2729			out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
2730		case "subscriptionType":
2731			out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
2732		case "directives":
2733			out.Values[i] = ec.___Schema_directives(ctx, field, obj)
2734		default:
2735			panic("unknown field " + strconv.Quote(field.Name))
2736		}
2737	}
2738
2739	return out
2740}
2741
2742func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
2743	rctx := graphql.GetResolverContext(ctx)
2744	rctx.Object = "__Schema"
2745	rctx.Args = nil
2746	rctx.Field = field
2747	rctx.PushField(field.Alias)
2748	defer rctx.Pop()
2749	res := obj.Types()
2750	arr1 := graphql.Array{}
2751	for idx1 := range res {
2752		arr1 = append(arr1, func() graphql.Marshaler {
2753			rctx := graphql.GetResolverContext(ctx)
2754			rctx.PushIndex(idx1)
2755			defer rctx.Pop()
2756			return ec.___Type(ctx, field.Selections, &res[idx1])
2757		}())
2758	}
2759	return arr1
2760}
2761
2762func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
2763	rctx := graphql.GetResolverContext(ctx)
2764	rctx.Object = "__Schema"
2765	rctx.Args = nil
2766	rctx.Field = field
2767	rctx.PushField(field.Alias)
2768	defer rctx.Pop()
2769	res := obj.QueryType()
2770	return ec.___Type(ctx, field.Selections, &res)
2771}
2772
2773func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
2774	rctx := graphql.GetResolverContext(ctx)
2775	rctx.Object = "__Schema"
2776	rctx.Args = nil
2777	rctx.Field = field
2778	rctx.PushField(field.Alias)
2779	defer rctx.Pop()
2780	res := obj.MutationType()
2781	if res == nil {
2782		return graphql.Null
2783	}
2784	return ec.___Type(ctx, field.Selections, res)
2785}
2786
2787func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
2788	rctx := graphql.GetResolverContext(ctx)
2789	rctx.Object = "__Schema"
2790	rctx.Args = nil
2791	rctx.Field = field
2792	rctx.PushField(field.Alias)
2793	defer rctx.Pop()
2794	res := obj.SubscriptionType()
2795	if res == nil {
2796		return graphql.Null
2797	}
2798	return ec.___Type(ctx, field.Selections, res)
2799}
2800
2801func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
2802	rctx := graphql.GetResolverContext(ctx)
2803	rctx.Object = "__Schema"
2804	rctx.Args = nil
2805	rctx.Field = field
2806	rctx.PushField(field.Alias)
2807	defer rctx.Pop()
2808	res := obj.Directives()
2809	arr1 := graphql.Array{}
2810	for idx1 := range res {
2811		arr1 = append(arr1, func() graphql.Marshaler {
2812			rctx := graphql.GetResolverContext(ctx)
2813			rctx.PushIndex(idx1)
2814			defer rctx.Pop()
2815			return ec.___Directive(ctx, field.Selections, &res[idx1])
2816		}())
2817	}
2818	return arr1
2819}
2820
2821var __TypeImplementors = []string{"__Type"}
2822
2823// nolint: gocyclo, errcheck, gas, goconst
2824func (ec *executionContext) ___Type(ctx context.Context, sel []query.Selection, obj *introspection.Type) graphql.Marshaler {
2825	fields := graphql.CollectFields(ec.Doc, sel, __TypeImplementors, ec.Variables)
2826
2827	out := graphql.NewOrderedMap(len(fields))
2828	for i, field := range fields {
2829		out.Keys[i] = field.Alias
2830
2831		switch field.Name {
2832		case "__typename":
2833			out.Values[i] = graphql.MarshalString("__Type")
2834		case "kind":
2835			out.Values[i] = ec.___Type_kind(ctx, field, obj)
2836		case "name":
2837			out.Values[i] = ec.___Type_name(ctx, field, obj)
2838		case "description":
2839			out.Values[i] = ec.___Type_description(ctx, field, obj)
2840		case "fields":
2841			out.Values[i] = ec.___Type_fields(ctx, field, obj)
2842		case "interfaces":
2843			out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
2844		case "possibleTypes":
2845			out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
2846		case "enumValues":
2847			out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
2848		case "inputFields":
2849			out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
2850		case "ofType":
2851			out.Values[i] = ec.___Type_ofType(ctx, field, obj)
2852		default:
2853			panic("unknown field " + strconv.Quote(field.Name))
2854		}
2855	}
2856
2857	return out
2858}
2859
2860func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2861	rctx := graphql.GetResolverContext(ctx)
2862	rctx.Object = "__Type"
2863	rctx.Args = nil
2864	rctx.Field = field
2865	rctx.PushField(field.Alias)
2866	defer rctx.Pop()
2867	res := obj.Kind()
2868	return graphql.MarshalString(res)
2869}
2870
2871func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2872	rctx := graphql.GetResolverContext(ctx)
2873	rctx.Object = "__Type"
2874	rctx.Args = nil
2875	rctx.Field = field
2876	rctx.PushField(field.Alias)
2877	defer rctx.Pop()
2878	res := obj.Name()
2879	if res == nil {
2880		return graphql.Null
2881	}
2882	return graphql.MarshalString(*res)
2883}
2884
2885func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2886	rctx := graphql.GetResolverContext(ctx)
2887	rctx.Object = "__Type"
2888	rctx.Args = nil
2889	rctx.Field = field
2890	rctx.PushField(field.Alias)
2891	defer rctx.Pop()
2892	res := obj.Description()
2893	if res == nil {
2894		return graphql.Null
2895	}
2896	return graphql.MarshalString(*res)
2897}
2898
2899func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2900	args := map[string]interface{}{}
2901	var arg0 bool
2902	if tmp, ok := field.Args["includeDeprecated"]; ok {
2903		var err error
2904		arg0, err = graphql.UnmarshalBoolean(tmp)
2905		if err != nil {
2906			ec.Error(ctx, err)
2907			return graphql.Null
2908		}
2909	}
2910	args["includeDeprecated"] = arg0
2911	rctx := graphql.GetResolverContext(ctx)
2912	rctx.Object = "__Type"
2913	rctx.Args = args
2914	rctx.Field = field
2915	rctx.PushField(field.Alias)
2916	defer rctx.Pop()
2917	res := obj.Fields(args["includeDeprecated"].(bool))
2918	arr1 := graphql.Array{}
2919	for idx1 := range res {
2920		arr1 = append(arr1, func() graphql.Marshaler {
2921			rctx := graphql.GetResolverContext(ctx)
2922			rctx.PushIndex(idx1)
2923			defer rctx.Pop()
2924			return ec.___Field(ctx, field.Selections, &res[idx1])
2925		}())
2926	}
2927	return arr1
2928}
2929
2930func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2931	rctx := graphql.GetResolverContext(ctx)
2932	rctx.Object = "__Type"
2933	rctx.Args = nil
2934	rctx.Field = field
2935	rctx.PushField(field.Alias)
2936	defer rctx.Pop()
2937	res := obj.Interfaces()
2938	arr1 := graphql.Array{}
2939	for idx1 := range res {
2940		arr1 = append(arr1, func() graphql.Marshaler {
2941			rctx := graphql.GetResolverContext(ctx)
2942			rctx.PushIndex(idx1)
2943			defer rctx.Pop()
2944			return ec.___Type(ctx, field.Selections, &res[idx1])
2945		}())
2946	}
2947	return arr1
2948}
2949
2950func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2951	rctx := graphql.GetResolverContext(ctx)
2952	rctx.Object = "__Type"
2953	rctx.Args = nil
2954	rctx.Field = field
2955	rctx.PushField(field.Alias)
2956	defer rctx.Pop()
2957	res := obj.PossibleTypes()
2958	arr1 := graphql.Array{}
2959	for idx1 := range res {
2960		arr1 = append(arr1, func() graphql.Marshaler {
2961			rctx := graphql.GetResolverContext(ctx)
2962			rctx.PushIndex(idx1)
2963			defer rctx.Pop()
2964			return ec.___Type(ctx, field.Selections, &res[idx1])
2965		}())
2966	}
2967	return arr1
2968}
2969
2970func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
2971	args := map[string]interface{}{}
2972	var arg0 bool
2973	if tmp, ok := field.Args["includeDeprecated"]; ok {
2974		var err error
2975		arg0, err = graphql.UnmarshalBoolean(tmp)
2976		if err != nil {
2977			ec.Error(ctx, err)
2978			return graphql.Null
2979		}
2980	}
2981	args["includeDeprecated"] = arg0
2982	rctx := graphql.GetResolverContext(ctx)
2983	rctx.Object = "__Type"
2984	rctx.Args = args
2985	rctx.Field = field
2986	rctx.PushField(field.Alias)
2987	defer rctx.Pop()
2988	res := obj.EnumValues(args["includeDeprecated"].(bool))
2989	arr1 := graphql.Array{}
2990	for idx1 := range res {
2991		arr1 = append(arr1, func() graphql.Marshaler {
2992			rctx := graphql.GetResolverContext(ctx)
2993			rctx.PushIndex(idx1)
2994			defer rctx.Pop()
2995			return ec.___EnumValue(ctx, field.Selections, &res[idx1])
2996		}())
2997	}
2998	return arr1
2999}
3000
3001func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
3002	rctx := graphql.GetResolverContext(ctx)
3003	rctx.Object = "__Type"
3004	rctx.Args = nil
3005	rctx.Field = field
3006	rctx.PushField(field.Alias)
3007	defer rctx.Pop()
3008	res := obj.InputFields()
3009	arr1 := graphql.Array{}
3010	for idx1 := range res {
3011		arr1 = append(arr1, func() graphql.Marshaler {
3012			rctx := graphql.GetResolverContext(ctx)
3013			rctx.PushIndex(idx1)
3014			defer rctx.Pop()
3015			return ec.___InputValue(ctx, field.Selections, &res[idx1])
3016		}())
3017	}
3018	return arr1
3019}
3020
3021func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
3022	rctx := graphql.GetResolverContext(ctx)
3023	rctx.Object = "__Type"
3024	rctx.Args = nil
3025	rctx.Field = field
3026	rctx.PushField(field.Alias)
3027	defer rctx.Pop()
3028	res := obj.OfType()
3029	if res == nil {
3030		return graphql.Null
3031	}
3032	return ec.___Type(ctx, field.Selections, res)
3033}
3034
3035func (ec *executionContext) _Authored(ctx context.Context, sel []query.Selection, obj *models.Authored) graphql.Marshaler {
3036	switch obj := (*obj).(type) {
3037	case nil:
3038		return graphql.Null
3039	case bug.Comment:
3040		return ec._Comment(ctx, sel, &obj)
3041	case *bug.Comment:
3042		return ec._Comment(ctx, sel, obj)
3043	case operations.CreateOperation:
3044		return ec._CreateOperation(ctx, sel, &obj)
3045	case *operations.CreateOperation:
3046		return ec._CreateOperation(ctx, sel, obj)
3047	case operations.SetTitleOperation:
3048		return ec._SetTitleOperation(ctx, sel, &obj)
3049	case *operations.SetTitleOperation:
3050		return ec._SetTitleOperation(ctx, sel, obj)
3051	case operations.AddCommentOperation:
3052		return ec._AddCommentOperation(ctx, sel, &obj)
3053	case *operations.AddCommentOperation:
3054		return ec._AddCommentOperation(ctx, sel, obj)
3055	case operations.SetStatusOperation:
3056		return ec._SetStatusOperation(ctx, sel, &obj)
3057	case *operations.SetStatusOperation:
3058		return ec._SetStatusOperation(ctx, sel, obj)
3059	case operations.LabelChangeOperation:
3060		return ec._LabelChangeOperation(ctx, sel, &obj)
3061	case *operations.LabelChangeOperation:
3062		return ec._LabelChangeOperation(ctx, sel, obj)
3063	default:
3064		panic(fmt.Errorf("unexpected type %T", obj))
3065	}
3066}
3067
3068func (ec *executionContext) _Operation(ctx context.Context, sel []query.Selection, obj *bug.Operation) graphql.Marshaler {
3069	switch obj := (*obj).(type) {
3070	case nil:
3071		return graphql.Null
3072	case operations.CreateOperation:
3073		return ec._CreateOperation(ctx, sel, &obj)
3074	case *operations.CreateOperation:
3075		return ec._CreateOperation(ctx, sel, obj)
3076	case operations.SetTitleOperation:
3077		return ec._SetTitleOperation(ctx, sel, &obj)
3078	case *operations.SetTitleOperation:
3079		return ec._SetTitleOperation(ctx, sel, obj)
3080	case operations.AddCommentOperation:
3081		return ec._AddCommentOperation(ctx, sel, &obj)
3082	case *operations.AddCommentOperation:
3083		return ec._AddCommentOperation(ctx, sel, obj)
3084	case operations.SetStatusOperation:
3085		return ec._SetStatusOperation(ctx, sel, &obj)
3086	case *operations.SetStatusOperation:
3087		return ec._SetStatusOperation(ctx, sel, obj)
3088	case operations.LabelChangeOperation:
3089		return ec._LabelChangeOperation(ctx, sel, &obj)
3090	case *operations.LabelChangeOperation:
3091		return ec._LabelChangeOperation(ctx, sel, obj)
3092	default:
3093		panic(fmt.Errorf("unexpected type %T", obj))
3094	}
3095}
3096
3097func (ec *executionContext) introspectSchema() *introspection.Schema {
3098	return introspection.WrapSchema(parsedSchema)
3099}
3100
3101func (ec *executionContext) introspectType(name string) *introspection.Type {
3102	t := parsedSchema.Resolve(name)
3103	if t == nil {
3104		return nil
3105	}
3106	return introspection.WrapType(t)
3107}
3108
3109var parsedSchema = schema.MustParse(`scalar Time
3110scalar Label
3111
3112# Information about pagination in a connection.
3113type PageInfo {
3114  # When paginating forwards, are there more items?
3115  hasNextPage: Boolean!
3116  # When paginating backwards, are there more items?
3117  hasPreviousPage: Boolean!
3118  # When paginating backwards, the cursor to continue.
3119#  startCursor: String
3120  # When paginating forwards, the cursor to continue.
3121#  endCursor: String
3122}
3123
3124# Represents an person in a git object.
3125type Person {
3126  # The email of the person.
3127  email: String
3128
3129  # The name of the person.
3130  name: String
3131}
3132
3133type CommentConnection {
3134  edges: [CommentEdge!]!
3135  nodes: [Comment!]!
3136  pageInfo: PageInfo!
3137  totalCount: Int!
3138}
3139
3140type CommentEdge {
3141  cursor: String!
3142  node: Comment!
3143}
3144
3145# Represents a comment on a bug.
3146type Comment implements Authored {
3147  # The author of this comment.
3148  author: Person!
3149
3150  # The message of this comment.
3151  message: String!
3152}
3153
3154enum Status {
3155  OPEN
3156  CLOSED
3157}
3158
3159# An object that has an author.
3160interface Authored {
3161  # The author of this object.
3162  author: Person!
3163}
3164
3165type OperationConnection {
3166  edges: [OperationEdge!]!
3167  nodes: [Operation!]!
3168  pageInfo: PageInfo!
3169  totalCount: Int!
3170}
3171
3172type OperationEdge {
3173  cursor: String!
3174  node: Operation!
3175}
3176
3177# An operation applied to a bug.
3178interface Operation {
3179  # The operations author.
3180  author: Person!
3181  # The datetime when this operation was issued.
3182  date: Time!
3183}
3184
3185type CreateOperation implements Operation, Authored {
3186  author: Person!
3187  date: Time!
3188
3189  title: String!
3190  message: String!
3191}
3192
3193type SetTitleOperation implements Operation, Authored {
3194  author: Person!
3195  date: Time!
3196
3197  title: String!
3198}
3199
3200type AddCommentOperation implements Operation, Authored {
3201  author: Person!
3202  date: Time!
3203
3204  message: String!
3205}
3206
3207type SetStatusOperation implements Operation, Authored {
3208  author: Person!
3209  date: Time!
3210
3211  status: Status!
3212}
3213
3214type LabelChangeOperation implements Operation, Authored {
3215  author: Person!
3216  date: Time!
3217
3218  added: [Label!]!
3219  removed: [Label!]!
3220}
3221
3222# The connection type for Bug.
3223type BugConnection {
3224  # A list of edges.
3225  edges: [BugEdge!]!
3226  nodes: [Bug!]!
3227  # Information to aid in pagination.
3228  pageInfo: PageInfo!
3229  # Identifies the total count of items in the connection.
3230  totalCount: Int!
3231}
3232
3233# An edge in a connection.
3234type BugEdge {
3235  # A cursor for use in pagination.
3236  cursor: String!
3237  # The item at the end of the edge.
3238  node: Bug!
3239}
3240
3241type Bug {
3242  id: String!
3243  humanId: String!
3244  status: Status!
3245  title: String!
3246  labels: [Label!]!
3247  author: Person!
3248  createdAt: Time!
3249  lastEdit: Time!
3250
3251  comments(
3252    # Returns the elements in the list that come after the specified cursor.
3253    after: String
3254    # Returns the elements in the list that come before the specified cursor.
3255    before: String
3256    # Returns the first _n_ elements from the list.
3257    first: Int
3258    # Returns the last _n_ elements from the list.
3259    last: Int
3260  ): CommentConnection!
3261
3262  operations(
3263    # Returns the elements in the list that come after the specified cursor.
3264    after: String
3265    # Returns the elements in the list that come before the specified cursor.
3266    before: String
3267    # Returns the first _n_ elements from the list.
3268    first: Int
3269    # Returns the last _n_ elements from the list.
3270    last: Int
3271  ): OperationConnection!
3272}
3273
3274type Repository {
3275  allBugs(
3276    # Returns the elements in the list that come after the specified cursor.
3277    after: String
3278    # Returns the elements in the list that come before the specified cursor.
3279    before: String
3280    # Returns the first _n_ elements from the list.
3281    first: Int
3282    # Returns the last _n_ elements from the list.
3283    last: Int
3284  ): BugConnection!
3285  bug(prefix: String!): Bug
3286}
3287
3288type Query {
3289  defaultRepository: Repository
3290  repository(id: String!): Repository
3291}
3292
3293type Mutation {
3294  newBug(repoRef: String, title: String!, message: String!): Bug!
3295
3296  addComment(repoRef: String, prefix: String!, message: String!): Bug!
3297  changeLabels(repoRef: String, prefix: String!, added: [String!], removed: [String!]): Bug!
3298  open(repoRef: String, prefix: String!): Bug!
3299  close(repoRef: String, prefix: String!): Bug!
3300  setTitle(repoRef: String, prefix: String!, title: String!): Bug!
3301
3302  commit(repoRef: String, prefix: String!): Bug!
3303}
3304`)