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