gen_graph.go

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