gen_graph.go

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