15652 lines
449 KiB
Go
15652 lines
449 KiB
Go
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"errors"
|
|
"fmt"
|
|
"strconv"
|
|
"sync"
|
|
"sync/atomic"
|
|
"time"
|
|
|
|
model1 "git.sr.ht/~sircmpwn/core-go/model"
|
|
"git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model"
|
|
"github.com/99designs/gqlgen/graphql"
|
|
"github.com/99designs/gqlgen/graphql/introspection"
|
|
gqlparser "github.com/vektah/gqlparser/v2"
|
|
"github.com/vektah/gqlparser/v2/ast"
|
|
)
|
|
|
|
// region ************************** generated!.gotpl **************************
|
|
|
|
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
|
|
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
|
|
return &executableSchema{
|
|
resolvers: cfg.Resolvers,
|
|
directives: cfg.Directives,
|
|
complexity: cfg.Complexity,
|
|
}
|
|
}
|
|
|
|
type Config struct {
|
|
Resolvers ResolverRoot
|
|
Directives DirectiveRoot
|
|
Complexity ComplexityRoot
|
|
}
|
|
|
|
type ResolverRoot interface {
|
|
Assignment() AssignmentResolver
|
|
Comment() CommentResolver
|
|
Created() CreatedResolver
|
|
Event() EventResolver
|
|
Label() LabelResolver
|
|
LabelUpdate() LabelUpdateResolver
|
|
Mutation() MutationResolver
|
|
Query() QueryResolver
|
|
StatusChange() StatusChangeResolver
|
|
Ticket() TicketResolver
|
|
TicketMention() TicketMentionResolver
|
|
TicketSubscription() TicketSubscriptionResolver
|
|
Tracker() TrackerResolver
|
|
TrackerACL() TrackerACLResolver
|
|
TrackerSubscription() TrackerSubscriptionResolver
|
|
User() UserResolver
|
|
UserMention() UserMentionResolver
|
|
}
|
|
|
|
type DirectiveRoot struct {
|
|
Access func(ctx context.Context, obj interface{}, next graphql.Resolver, scope model.AccessScope, kind model.AccessKind) (res interface{}, err error)
|
|
Scopehelp func(ctx context.Context, obj interface{}, next graphql.Resolver, details string) (res interface{}, err error)
|
|
}
|
|
|
|
type ComplexityRoot struct {
|
|
ACLCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
ActivitySubscriptionCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
Assignment struct {
|
|
Assignee func(childComplexity int) int
|
|
Assigner func(childComplexity int) int
|
|
EventType func(childComplexity int) int
|
|
Ticket func(childComplexity int) int
|
|
}
|
|
|
|
Comment struct {
|
|
Authenticity func(childComplexity int) int
|
|
Author func(childComplexity int) int
|
|
EventType func(childComplexity int) int
|
|
SupersededBy func(childComplexity int) int
|
|
Text func(childComplexity int) int
|
|
Ticket func(childComplexity int) int
|
|
}
|
|
|
|
Created struct {
|
|
Author func(childComplexity int) int
|
|
EventType func(childComplexity int) int
|
|
Ticket func(childComplexity int) int
|
|
}
|
|
|
|
DefaultACL struct {
|
|
Browse func(childComplexity int) int
|
|
Comment func(childComplexity int) int
|
|
Edit func(childComplexity int) int
|
|
Submit func(childComplexity int) int
|
|
Triage func(childComplexity int) int
|
|
}
|
|
|
|
EmailAddress struct {
|
|
CanonicalName func(childComplexity int) int
|
|
Mailbox func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
}
|
|
|
|
Event struct {
|
|
Changes func(childComplexity int) int
|
|
Created func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Ticket func(childComplexity int) int
|
|
}
|
|
|
|
EventCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
ExternalUser struct {
|
|
CanonicalName func(childComplexity int) int
|
|
ExternalID func(childComplexity int) int
|
|
ExternalURL func(childComplexity int) int
|
|
}
|
|
|
|
Label struct {
|
|
BackgroundColor func(childComplexity int) int
|
|
Created func(childComplexity int) int
|
|
ForegroundColor func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
Tickets func(childComplexity int, cursor *model1.Cursor) int
|
|
Tracker func(childComplexity int) int
|
|
}
|
|
|
|
LabelCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
LabelUpdate struct {
|
|
EventType func(childComplexity int) int
|
|
Label func(childComplexity int) int
|
|
Labeler func(childComplexity int) int
|
|
Ticket func(childComplexity int) int
|
|
}
|
|
|
|
Mutation struct {
|
|
AssignUser func(childComplexity int, trackerID int, ticketID int, userID int) int
|
|
CreateLabel func(childComplexity int, trackerID int, name string, foreground string, background string) int
|
|
CreateTracker func(childComplexity int, name string, description *string, visibility model.Visibility, importArg *graphql.Upload) int
|
|
DeleteACL func(childComplexity int, id int) int
|
|
DeleteLabel func(childComplexity int, id int) int
|
|
DeleteTracker func(childComplexity int, id int) int
|
|
LabelTicket func(childComplexity int, trackerID int, ticketID int, labelID int) int
|
|
SubmitComment func(childComplexity int, trackerID int, ticketID int, input model.SubmitCommentInput) int
|
|
SubmitTicket func(childComplexity int, trackerID int, input model.SubmitTicketInput) int
|
|
TicketSubscribe func(childComplexity int, trackerID int, ticketID int) int
|
|
TicketUnsubscribe func(childComplexity int, trackerID int, ticketID int) int
|
|
TrackerSubscribe func(childComplexity int, trackerID int) int
|
|
TrackerUnsubscribe func(childComplexity int, trackerID int, tickets bool) int
|
|
UnassignUser func(childComplexity int, trackerID int, ticketID int, userID int) int
|
|
UnlabelTicket func(childComplexity int, trackerID int, ticketID int, labelID int) int
|
|
UpdateLabel func(childComplexity int, id int, input map[string]interface{}) int
|
|
UpdateTicket func(childComplexity int, trackerID int, ticketID int, input map[string]interface{}) int
|
|
UpdateTicketStatus func(childComplexity int, trackerID int, ticketID int, input model.UpdateStatusInput) int
|
|
UpdateTracker func(childComplexity int, id int, input map[string]interface{}) int
|
|
UpdateTrackerACL func(childComplexity int, trackerID int, input model.ACLInput) int
|
|
UpdateUserACL func(childComplexity int, trackerID int, userID int, input model.ACLInput) int
|
|
}
|
|
|
|
Query struct {
|
|
Events func(childComplexity int, cursor *model1.Cursor) int
|
|
Me func(childComplexity int) int
|
|
Subscriptions func(childComplexity int, cursor *model1.Cursor) int
|
|
Tracker func(childComplexity int, id int) int
|
|
TrackerByName func(childComplexity int, name string) int
|
|
TrackerByOwner func(childComplexity int, owner string, tracker string) int
|
|
Trackers func(childComplexity int, cursor *model1.Cursor) int
|
|
User func(childComplexity int, username string) int
|
|
Version func(childComplexity int) int
|
|
}
|
|
|
|
StatusChange struct {
|
|
Editor func(childComplexity int) int
|
|
EventType func(childComplexity int) int
|
|
NewResolution func(childComplexity int) int
|
|
NewStatus func(childComplexity int) int
|
|
OldResolution func(childComplexity int) int
|
|
OldStatus func(childComplexity int) int
|
|
Ticket func(childComplexity int) int
|
|
}
|
|
|
|
Ticket struct {
|
|
Assignees func(childComplexity int) int
|
|
Authenticity func(childComplexity int) int
|
|
Body func(childComplexity int) int
|
|
Created func(childComplexity int) int
|
|
Events func(childComplexity int, cursor *model1.Cursor) int
|
|
ID func(childComplexity int) int
|
|
Labels func(childComplexity int) int
|
|
Ref func(childComplexity int) int
|
|
Resolution func(childComplexity int) int
|
|
Status func(childComplexity int) int
|
|
Subject func(childComplexity int) int
|
|
Submitter func(childComplexity int) int
|
|
Subscription func(childComplexity int) int
|
|
Tracker func(childComplexity int) int
|
|
Updated func(childComplexity int) int
|
|
}
|
|
|
|
TicketCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
TicketMention struct {
|
|
Author func(childComplexity int) int
|
|
EventType func(childComplexity int) int
|
|
Mentioned func(childComplexity int) int
|
|
Ticket func(childComplexity int) int
|
|
}
|
|
|
|
TicketSubscription struct {
|
|
Created func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Ticket func(childComplexity int) int
|
|
}
|
|
|
|
Tracker struct {
|
|
ACL func(childComplexity int) int
|
|
Acls func(childComplexity int, cursor *model1.Cursor) int
|
|
Created func(childComplexity int) int
|
|
DefaultACL func(childComplexity int) int
|
|
Description func(childComplexity int) int
|
|
Export func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Labels func(childComplexity int, cursor *model1.Cursor) int
|
|
Name func(childComplexity int) int
|
|
Owner func(childComplexity int) int
|
|
Subscription func(childComplexity int) int
|
|
Ticket func(childComplexity int, id int) int
|
|
Tickets func(childComplexity int, cursor *model1.Cursor) int
|
|
Updated func(childComplexity int) int
|
|
Visibility func(childComplexity int) int
|
|
}
|
|
|
|
TrackerACL struct {
|
|
Browse func(childComplexity int) int
|
|
Comment func(childComplexity int) int
|
|
Created func(childComplexity int) int
|
|
Edit func(childComplexity int) int
|
|
Entity func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Submit func(childComplexity int) int
|
|
Tracker func(childComplexity int) int
|
|
Triage func(childComplexity int) int
|
|
}
|
|
|
|
TrackerCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
TrackerSubscription struct {
|
|
Created func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Tracker func(childComplexity int) int
|
|
}
|
|
|
|
User struct {
|
|
Bio func(childComplexity int) int
|
|
CanonicalName func(childComplexity int) int
|
|
Created func(childComplexity int) int
|
|
Email func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Location func(childComplexity int) int
|
|
Trackers func(childComplexity int, cursor *model1.Cursor) int
|
|
URL func(childComplexity int) int
|
|
Updated func(childComplexity int) int
|
|
Username func(childComplexity int) int
|
|
}
|
|
|
|
UserMention struct {
|
|
Author func(childComplexity int) int
|
|
EventType func(childComplexity int) int
|
|
Mentioned func(childComplexity int) int
|
|
Ticket func(childComplexity int) int
|
|
}
|
|
|
|
Version struct {
|
|
DeprecationDate func(childComplexity int) int
|
|
Major func(childComplexity int) int
|
|
Minor func(childComplexity int) int
|
|
Patch func(childComplexity int) int
|
|
}
|
|
}
|
|
|
|
type AssignmentResolver interface {
|
|
Ticket(ctx context.Context, obj *model.Assignment) (*model.Ticket, error)
|
|
Assigner(ctx context.Context, obj *model.Assignment) (model.Entity, error)
|
|
Assignee(ctx context.Context, obj *model.Assignment) (model.Entity, error)
|
|
}
|
|
type CommentResolver interface {
|
|
Ticket(ctx context.Context, obj *model.Comment) (*model.Ticket, error)
|
|
Author(ctx context.Context, obj *model.Comment) (model.Entity, error)
|
|
Text(ctx context.Context, obj *model.Comment) (string, error)
|
|
Authenticity(ctx context.Context, obj *model.Comment) (model.Authenticity, error)
|
|
SupersededBy(ctx context.Context, obj *model.Comment) (*model.Comment, error)
|
|
}
|
|
type CreatedResolver interface {
|
|
Ticket(ctx context.Context, obj *model.Created) (*model.Ticket, error)
|
|
Author(ctx context.Context, obj *model.Created) (model.Entity, error)
|
|
}
|
|
type EventResolver interface {
|
|
Ticket(ctx context.Context, obj *model.Event) (*model.Ticket, error)
|
|
}
|
|
type LabelResolver interface {
|
|
Tracker(ctx context.Context, obj *model.Label) (*model.Tracker, error)
|
|
|
|
Tickets(ctx context.Context, obj *model.Label, cursor *model1.Cursor) (*model.TicketCursor, error)
|
|
}
|
|
type LabelUpdateResolver interface {
|
|
Ticket(ctx context.Context, obj *model.LabelUpdate) (*model.Ticket, error)
|
|
Labeler(ctx context.Context, obj *model.LabelUpdate) (model.Entity, error)
|
|
Label(ctx context.Context, obj *model.LabelUpdate) (*model.Label, error)
|
|
}
|
|
type MutationResolver interface {
|
|
CreateTracker(ctx context.Context, name string, description *string, visibility model.Visibility, importArg *graphql.Upload) (*model.Tracker, error)
|
|
UpdateTracker(ctx context.Context, id int, input map[string]interface{}) (*model.Tracker, error)
|
|
DeleteTracker(ctx context.Context, id int) (*model.Tracker, error)
|
|
UpdateUserACL(ctx context.Context, trackerID int, userID int, input model.ACLInput) (*model.TrackerACL, error)
|
|
UpdateTrackerACL(ctx context.Context, trackerID int, input model.ACLInput) (*model.DefaultACL, error)
|
|
DeleteACL(ctx context.Context, id int) (*model.TrackerACL, error)
|
|
TrackerSubscribe(ctx context.Context, trackerID int) (*model.TrackerSubscription, error)
|
|
TrackerUnsubscribe(ctx context.Context, trackerID int, tickets bool) (*model.TrackerSubscription, error)
|
|
TicketSubscribe(ctx context.Context, trackerID int, ticketID int) (*model.TicketSubscription, error)
|
|
TicketUnsubscribe(ctx context.Context, trackerID int, ticketID int) (*model.TicketSubscription, error)
|
|
CreateLabel(ctx context.Context, trackerID int, name string, foreground string, background string) (*model.Label, error)
|
|
UpdateLabel(ctx context.Context, id int, input map[string]interface{}) (*model.Label, error)
|
|
DeleteLabel(ctx context.Context, id int) (*model.Label, error)
|
|
SubmitTicket(ctx context.Context, trackerID int, input model.SubmitTicketInput) (*model.Ticket, error)
|
|
UpdateTicket(ctx context.Context, trackerID int, ticketID int, input map[string]interface{}) (*model.Ticket, error)
|
|
UpdateTicketStatus(ctx context.Context, trackerID int, ticketID int, input model.UpdateStatusInput) (*model.Event, error)
|
|
SubmitComment(ctx context.Context, trackerID int, ticketID int, input model.SubmitCommentInput) (*model.Event, error)
|
|
AssignUser(ctx context.Context, trackerID int, ticketID int, userID int) (*model.Event, error)
|
|
UnassignUser(ctx context.Context, trackerID int, ticketID int, userID int) (*model.Event, error)
|
|
LabelTicket(ctx context.Context, trackerID int, ticketID int, labelID int) (*model.Event, error)
|
|
UnlabelTicket(ctx context.Context, trackerID int, ticketID int, labelID int) (*model.Event, error)
|
|
}
|
|
type QueryResolver interface {
|
|
Version(ctx context.Context) (*model.Version, error)
|
|
Me(ctx context.Context) (*model.User, error)
|
|
User(ctx context.Context, username string) (*model.User, error)
|
|
Trackers(ctx context.Context, cursor *model1.Cursor) (*model.TrackerCursor, error)
|
|
Tracker(ctx context.Context, id int) (*model.Tracker, error)
|
|
TrackerByName(ctx context.Context, name string) (*model.Tracker, error)
|
|
TrackerByOwner(ctx context.Context, owner string, tracker string) (*model.Tracker, error)
|
|
Events(ctx context.Context, cursor *model1.Cursor) (*model.EventCursor, error)
|
|
Subscriptions(ctx context.Context, cursor *model1.Cursor) (*model.ActivitySubscriptionCursor, error)
|
|
}
|
|
type StatusChangeResolver interface {
|
|
Ticket(ctx context.Context, obj *model.StatusChange) (*model.Ticket, error)
|
|
Editor(ctx context.Context, obj *model.StatusChange) (model.Entity, error)
|
|
}
|
|
type TicketResolver interface {
|
|
Submitter(ctx context.Context, obj *model.Ticket) (model.Entity, error)
|
|
Tracker(ctx context.Context, obj *model.Ticket) (*model.Tracker, error)
|
|
|
|
Labels(ctx context.Context, obj *model.Ticket) ([]*model.Label, error)
|
|
Assignees(ctx context.Context, obj *model.Ticket) ([]model.Entity, error)
|
|
Events(ctx context.Context, obj *model.Ticket, cursor *model1.Cursor) (*model.EventCursor, error)
|
|
Subscription(ctx context.Context, obj *model.Ticket) (*model.TicketSubscription, error)
|
|
}
|
|
type TicketMentionResolver interface {
|
|
Ticket(ctx context.Context, obj *model.TicketMention) (*model.Ticket, error)
|
|
Author(ctx context.Context, obj *model.TicketMention) (model.Entity, error)
|
|
Mentioned(ctx context.Context, obj *model.TicketMention) (*model.Ticket, error)
|
|
}
|
|
type TicketSubscriptionResolver interface {
|
|
Ticket(ctx context.Context, obj *model.TicketSubscription) (*model.Ticket, error)
|
|
}
|
|
type TrackerResolver interface {
|
|
Owner(ctx context.Context, obj *model.Tracker) (model.Entity, error)
|
|
|
|
Ticket(ctx context.Context, obj *model.Tracker, id int) (*model.Ticket, error)
|
|
Tickets(ctx context.Context, obj *model.Tracker, cursor *model1.Cursor) (*model.TicketCursor, error)
|
|
Labels(ctx context.Context, obj *model.Tracker, cursor *model1.Cursor) (*model.LabelCursor, error)
|
|
Subscription(ctx context.Context, obj *model.Tracker) (*model.TrackerSubscription, error)
|
|
ACL(ctx context.Context, obj *model.Tracker) (model.ACL, error)
|
|
DefaultACL(ctx context.Context, obj *model.Tracker) (*model.DefaultACL, error)
|
|
Acls(ctx context.Context, obj *model.Tracker, cursor *model1.Cursor) (*model.ACLCursor, error)
|
|
Export(ctx context.Context, obj *model.Tracker) (string, error)
|
|
}
|
|
type TrackerACLResolver interface {
|
|
Tracker(ctx context.Context, obj *model.TrackerACL) (*model.Tracker, error)
|
|
Entity(ctx context.Context, obj *model.TrackerACL) (model.Entity, error)
|
|
}
|
|
type TrackerSubscriptionResolver interface {
|
|
Tracker(ctx context.Context, obj *model.TrackerSubscription) (*model.Tracker, error)
|
|
}
|
|
type UserResolver interface {
|
|
Trackers(ctx context.Context, obj *model.User, cursor *model1.Cursor) (*model.TrackerCursor, error)
|
|
}
|
|
type UserMentionResolver interface {
|
|
Ticket(ctx context.Context, obj *model.UserMention) (*model.Ticket, error)
|
|
Author(ctx context.Context, obj *model.UserMention) (model.Entity, error)
|
|
Mentioned(ctx context.Context, obj *model.UserMention) (model.Entity, error)
|
|
}
|
|
|
|
type executableSchema struct {
|
|
resolvers ResolverRoot
|
|
directives DirectiveRoot
|
|
complexity ComplexityRoot
|
|
}
|
|
|
|
func (e *executableSchema) Schema() *ast.Schema {
|
|
return parsedSchema
|
|
}
|
|
|
|
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
|
|
ec := executionContext{nil, e}
|
|
_ = ec
|
|
switch typeName + "." + field {
|
|
|
|
case "ACLCursor.cursor":
|
|
if e.complexity.ACLCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ACLCursor.Cursor(childComplexity), true
|
|
|
|
case "ACLCursor.results":
|
|
if e.complexity.ACLCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ACLCursor.Results(childComplexity), true
|
|
|
|
case "ActivitySubscriptionCursor.cursor":
|
|
if e.complexity.ActivitySubscriptionCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ActivitySubscriptionCursor.Cursor(childComplexity), true
|
|
|
|
case "ActivitySubscriptionCursor.results":
|
|
if e.complexity.ActivitySubscriptionCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ActivitySubscriptionCursor.Results(childComplexity), true
|
|
|
|
case "Assignment.assignee":
|
|
if e.complexity.Assignment.Assignee == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Assignment.Assignee(childComplexity), true
|
|
|
|
case "Assignment.assigner":
|
|
if e.complexity.Assignment.Assigner == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Assignment.Assigner(childComplexity), true
|
|
|
|
case "Assignment.eventType":
|
|
if e.complexity.Assignment.EventType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Assignment.EventType(childComplexity), true
|
|
|
|
case "Assignment.ticket":
|
|
if e.complexity.Assignment.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Assignment.Ticket(childComplexity), true
|
|
|
|
case "Comment.authenticity":
|
|
if e.complexity.Comment.Authenticity == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Comment.Authenticity(childComplexity), true
|
|
|
|
case "Comment.author":
|
|
if e.complexity.Comment.Author == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Comment.Author(childComplexity), true
|
|
|
|
case "Comment.eventType":
|
|
if e.complexity.Comment.EventType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Comment.EventType(childComplexity), true
|
|
|
|
case "Comment.supersededBy":
|
|
if e.complexity.Comment.SupersededBy == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Comment.SupersededBy(childComplexity), true
|
|
|
|
case "Comment.text":
|
|
if e.complexity.Comment.Text == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Comment.Text(childComplexity), true
|
|
|
|
case "Comment.ticket":
|
|
if e.complexity.Comment.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Comment.Ticket(childComplexity), true
|
|
|
|
case "Created.author":
|
|
if e.complexity.Created.Author == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Created.Author(childComplexity), true
|
|
|
|
case "Created.eventType":
|
|
if e.complexity.Created.EventType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Created.EventType(childComplexity), true
|
|
|
|
case "Created.ticket":
|
|
if e.complexity.Created.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Created.Ticket(childComplexity), true
|
|
|
|
case "DefaultACL.browse":
|
|
if e.complexity.DefaultACL.Browse == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.DefaultACL.Browse(childComplexity), true
|
|
|
|
case "DefaultACL.comment":
|
|
if e.complexity.DefaultACL.Comment == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.DefaultACL.Comment(childComplexity), true
|
|
|
|
case "DefaultACL.edit":
|
|
if e.complexity.DefaultACL.Edit == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.DefaultACL.Edit(childComplexity), true
|
|
|
|
case "DefaultACL.submit":
|
|
if e.complexity.DefaultACL.Submit == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.DefaultACL.Submit(childComplexity), true
|
|
|
|
case "DefaultACL.triage":
|
|
if e.complexity.DefaultACL.Triage == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.DefaultACL.Triage(childComplexity), true
|
|
|
|
case "EmailAddress.canonicalName":
|
|
if e.complexity.EmailAddress.CanonicalName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.EmailAddress.CanonicalName(childComplexity), true
|
|
|
|
case "EmailAddress.mailbox":
|
|
if e.complexity.EmailAddress.Mailbox == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.EmailAddress.Mailbox(childComplexity), true
|
|
|
|
case "EmailAddress.name":
|
|
if e.complexity.EmailAddress.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.EmailAddress.Name(childComplexity), true
|
|
|
|
case "Event.changes":
|
|
if e.complexity.Event.Changes == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Event.Changes(childComplexity), true
|
|
|
|
case "Event.created":
|
|
if e.complexity.Event.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Event.Created(childComplexity), true
|
|
|
|
case "Event.id":
|
|
if e.complexity.Event.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Event.ID(childComplexity), true
|
|
|
|
case "Event.ticket":
|
|
if e.complexity.Event.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Event.Ticket(childComplexity), true
|
|
|
|
case "EventCursor.cursor":
|
|
if e.complexity.EventCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.EventCursor.Cursor(childComplexity), true
|
|
|
|
case "EventCursor.results":
|
|
if e.complexity.EventCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.EventCursor.Results(childComplexity), true
|
|
|
|
case "ExternalUser.canonicalName":
|
|
if e.complexity.ExternalUser.CanonicalName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ExternalUser.CanonicalName(childComplexity), true
|
|
|
|
case "ExternalUser.externalId":
|
|
if e.complexity.ExternalUser.ExternalID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ExternalUser.ExternalID(childComplexity), true
|
|
|
|
case "ExternalUser.externalUrl":
|
|
if e.complexity.ExternalUser.ExternalURL == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ExternalUser.ExternalURL(childComplexity), true
|
|
|
|
case "Label.backgroundColor":
|
|
if e.complexity.Label.BackgroundColor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Label.BackgroundColor(childComplexity), true
|
|
|
|
case "Label.created":
|
|
if e.complexity.Label.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Label.Created(childComplexity), true
|
|
|
|
case "Label.foregroundColor":
|
|
if e.complexity.Label.ForegroundColor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Label.ForegroundColor(childComplexity), true
|
|
|
|
case "Label.id":
|
|
if e.complexity.Label.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Label.ID(childComplexity), true
|
|
|
|
case "Label.name":
|
|
if e.complexity.Label.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Label.Name(childComplexity), true
|
|
|
|
case "Label.tickets":
|
|
if e.complexity.Label.Tickets == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Label_tickets_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Label.Tickets(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Label.tracker":
|
|
if e.complexity.Label.Tracker == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Label.Tracker(childComplexity), true
|
|
|
|
case "LabelCursor.cursor":
|
|
if e.complexity.LabelCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LabelCursor.Cursor(childComplexity), true
|
|
|
|
case "LabelCursor.results":
|
|
if e.complexity.LabelCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LabelCursor.Results(childComplexity), true
|
|
|
|
case "LabelUpdate.eventType":
|
|
if e.complexity.LabelUpdate.EventType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LabelUpdate.EventType(childComplexity), true
|
|
|
|
case "LabelUpdate.label":
|
|
if e.complexity.LabelUpdate.Label == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LabelUpdate.Label(childComplexity), true
|
|
|
|
case "LabelUpdate.labeler":
|
|
if e.complexity.LabelUpdate.Labeler == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LabelUpdate.Labeler(childComplexity), true
|
|
|
|
case "LabelUpdate.ticket":
|
|
if e.complexity.LabelUpdate.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.LabelUpdate.Ticket(childComplexity), true
|
|
|
|
case "Mutation.assignUser":
|
|
if e.complexity.Mutation.AssignUser == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_assignUser_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.AssignUser(childComplexity, args["trackerId"].(int), args["ticketId"].(int), args["userId"].(int)), true
|
|
|
|
case "Mutation.createLabel":
|
|
if e.complexity.Mutation.CreateLabel == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_createLabel_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.CreateLabel(childComplexity, args["trackerId"].(int), args["name"].(string), args["foreground"].(string), args["background"].(string)), true
|
|
|
|
case "Mutation.createTracker":
|
|
if e.complexity.Mutation.CreateTracker == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_createTracker_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.CreateTracker(childComplexity, args["name"].(string), args["description"].(*string), args["visibility"].(model.Visibility), args["import"].(*graphql.Upload)), true
|
|
|
|
case "Mutation.deleteACL":
|
|
if e.complexity.Mutation.DeleteACL == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_deleteACL_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.DeleteACL(childComplexity, args["id"].(int)), true
|
|
|
|
case "Mutation.deleteLabel":
|
|
if e.complexity.Mutation.DeleteLabel == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_deleteLabel_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.DeleteLabel(childComplexity, args["id"].(int)), true
|
|
|
|
case "Mutation.deleteTracker":
|
|
if e.complexity.Mutation.DeleteTracker == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_deleteTracker_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.DeleteTracker(childComplexity, args["id"].(int)), true
|
|
|
|
case "Mutation.labelTicket":
|
|
if e.complexity.Mutation.LabelTicket == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_labelTicket_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.LabelTicket(childComplexity, args["trackerId"].(int), args["ticketId"].(int), args["labelId"].(int)), true
|
|
|
|
case "Mutation.submitComment":
|
|
if e.complexity.Mutation.SubmitComment == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_submitComment_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.SubmitComment(childComplexity, args["trackerId"].(int), args["ticketId"].(int), args["input"].(model.SubmitCommentInput)), true
|
|
|
|
case "Mutation.submitTicket":
|
|
if e.complexity.Mutation.SubmitTicket == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_submitTicket_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.SubmitTicket(childComplexity, args["trackerId"].(int), args["input"].(model.SubmitTicketInput)), true
|
|
|
|
case "Mutation.ticketSubscribe":
|
|
if e.complexity.Mutation.TicketSubscribe == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_ticketSubscribe_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.TicketSubscribe(childComplexity, args["trackerId"].(int), args["ticketId"].(int)), true
|
|
|
|
case "Mutation.ticketUnsubscribe":
|
|
if e.complexity.Mutation.TicketUnsubscribe == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_ticketUnsubscribe_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.TicketUnsubscribe(childComplexity, args["trackerId"].(int), args["ticketId"].(int)), true
|
|
|
|
case "Mutation.trackerSubscribe":
|
|
if e.complexity.Mutation.TrackerSubscribe == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_trackerSubscribe_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.TrackerSubscribe(childComplexity, args["trackerId"].(int)), true
|
|
|
|
case "Mutation.trackerUnsubscribe":
|
|
if e.complexity.Mutation.TrackerUnsubscribe == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_trackerUnsubscribe_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.TrackerUnsubscribe(childComplexity, args["trackerId"].(int), args["tickets"].(bool)), true
|
|
|
|
case "Mutation.unassignUser":
|
|
if e.complexity.Mutation.UnassignUser == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_unassignUser_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UnassignUser(childComplexity, args["trackerId"].(int), args["ticketId"].(int), args["userId"].(int)), true
|
|
|
|
case "Mutation.unlabelTicket":
|
|
if e.complexity.Mutation.UnlabelTicket == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_unlabelTicket_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UnlabelTicket(childComplexity, args["trackerId"].(int), args["ticketId"].(int), args["labelId"].(int)), true
|
|
|
|
case "Mutation.updateLabel":
|
|
if e.complexity.Mutation.UpdateLabel == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateLabel_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateLabel(childComplexity, args["id"].(int), args["input"].(map[string]interface{})), true
|
|
|
|
case "Mutation.updateTicket":
|
|
if e.complexity.Mutation.UpdateTicket == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateTicket_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateTicket(childComplexity, args["trackerId"].(int), args["ticketId"].(int), args["input"].(map[string]interface{})), true
|
|
|
|
case "Mutation.updateTicketStatus":
|
|
if e.complexity.Mutation.UpdateTicketStatus == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateTicketStatus_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateTicketStatus(childComplexity, args["trackerId"].(int), args["ticketId"].(int), args["input"].(model.UpdateStatusInput)), true
|
|
|
|
case "Mutation.updateTracker":
|
|
if e.complexity.Mutation.UpdateTracker == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateTracker_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateTracker(childComplexity, args["id"].(int), args["input"].(map[string]interface{})), true
|
|
|
|
case "Mutation.updateTrackerACL":
|
|
if e.complexity.Mutation.UpdateTrackerACL == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateTrackerACL_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateTrackerACL(childComplexity, args["trackerId"].(int), args["input"].(model.ACLInput)), true
|
|
|
|
case "Mutation.updateUserACL":
|
|
if e.complexity.Mutation.UpdateUserACL == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateUserACL_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateUserACL(childComplexity, args["trackerId"].(int), args["userId"].(int), args["input"].(model.ACLInput)), true
|
|
|
|
case "Query.events":
|
|
if e.complexity.Query.Events == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_events_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Events(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Query.me":
|
|
if e.complexity.Query.Me == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Query.Me(childComplexity), true
|
|
|
|
case "Query.subscriptions":
|
|
if e.complexity.Query.Subscriptions == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_subscriptions_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Subscriptions(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Query.tracker":
|
|
if e.complexity.Query.Tracker == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_tracker_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Tracker(childComplexity, args["id"].(int)), true
|
|
|
|
case "Query.trackerByName":
|
|
if e.complexity.Query.TrackerByName == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_trackerByName_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.TrackerByName(childComplexity, args["name"].(string)), true
|
|
|
|
case "Query.trackerByOwner":
|
|
if e.complexity.Query.TrackerByOwner == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_trackerByOwner_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.TrackerByOwner(childComplexity, args["owner"].(string), args["tracker"].(string)), true
|
|
|
|
case "Query.trackers":
|
|
if e.complexity.Query.Trackers == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_trackers_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Trackers(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Query.user":
|
|
if e.complexity.Query.User == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_user_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.User(childComplexity, args["username"].(string)), true
|
|
|
|
case "Query.version":
|
|
if e.complexity.Query.Version == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Query.Version(childComplexity), true
|
|
|
|
case "StatusChange.editor":
|
|
if e.complexity.StatusChange.Editor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.StatusChange.Editor(childComplexity), true
|
|
|
|
case "StatusChange.eventType":
|
|
if e.complexity.StatusChange.EventType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.StatusChange.EventType(childComplexity), true
|
|
|
|
case "StatusChange.newResolution":
|
|
if e.complexity.StatusChange.NewResolution == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.StatusChange.NewResolution(childComplexity), true
|
|
|
|
case "StatusChange.newStatus":
|
|
if e.complexity.StatusChange.NewStatus == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.StatusChange.NewStatus(childComplexity), true
|
|
|
|
case "StatusChange.oldResolution":
|
|
if e.complexity.StatusChange.OldResolution == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.StatusChange.OldResolution(childComplexity), true
|
|
|
|
case "StatusChange.oldStatus":
|
|
if e.complexity.StatusChange.OldStatus == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.StatusChange.OldStatus(childComplexity), true
|
|
|
|
case "StatusChange.ticket":
|
|
if e.complexity.StatusChange.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.StatusChange.Ticket(childComplexity), true
|
|
|
|
case "Ticket.assignees":
|
|
if e.complexity.Ticket.Assignees == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Assignees(childComplexity), true
|
|
|
|
case "Ticket.authenticity":
|
|
if e.complexity.Ticket.Authenticity == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Authenticity(childComplexity), true
|
|
|
|
case "Ticket.body":
|
|
if e.complexity.Ticket.Body == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Body(childComplexity), true
|
|
|
|
case "Ticket.created":
|
|
if e.complexity.Ticket.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Created(childComplexity), true
|
|
|
|
case "Ticket.events":
|
|
if e.complexity.Ticket.Events == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Ticket_events_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Ticket.Events(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Ticket.id":
|
|
if e.complexity.Ticket.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.ID(childComplexity), true
|
|
|
|
case "Ticket.labels":
|
|
if e.complexity.Ticket.Labels == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Labels(childComplexity), true
|
|
|
|
case "Ticket.ref":
|
|
if e.complexity.Ticket.Ref == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Ref(childComplexity), true
|
|
|
|
case "Ticket.resolution":
|
|
if e.complexity.Ticket.Resolution == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Resolution(childComplexity), true
|
|
|
|
case "Ticket.status":
|
|
if e.complexity.Ticket.Status == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Status(childComplexity), true
|
|
|
|
case "Ticket.subject":
|
|
if e.complexity.Ticket.Subject == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Subject(childComplexity), true
|
|
|
|
case "Ticket.submitter":
|
|
if e.complexity.Ticket.Submitter == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Submitter(childComplexity), true
|
|
|
|
case "Ticket.subscription":
|
|
if e.complexity.Ticket.Subscription == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Subscription(childComplexity), true
|
|
|
|
case "Ticket.tracker":
|
|
if e.complexity.Ticket.Tracker == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Tracker(childComplexity), true
|
|
|
|
case "Ticket.updated":
|
|
if e.complexity.Ticket.Updated == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Ticket.Updated(childComplexity), true
|
|
|
|
case "TicketCursor.cursor":
|
|
if e.complexity.TicketCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TicketCursor.Cursor(childComplexity), true
|
|
|
|
case "TicketCursor.results":
|
|
if e.complexity.TicketCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TicketCursor.Results(childComplexity), true
|
|
|
|
case "TicketMention.author":
|
|
if e.complexity.TicketMention.Author == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TicketMention.Author(childComplexity), true
|
|
|
|
case "TicketMention.eventType":
|
|
if e.complexity.TicketMention.EventType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TicketMention.EventType(childComplexity), true
|
|
|
|
case "TicketMention.mentioned":
|
|
if e.complexity.TicketMention.Mentioned == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TicketMention.Mentioned(childComplexity), true
|
|
|
|
case "TicketMention.ticket":
|
|
if e.complexity.TicketMention.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TicketMention.Ticket(childComplexity), true
|
|
|
|
case "TicketSubscription.created":
|
|
if e.complexity.TicketSubscription.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TicketSubscription.Created(childComplexity), true
|
|
|
|
case "TicketSubscription.id":
|
|
if e.complexity.TicketSubscription.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TicketSubscription.ID(childComplexity), true
|
|
|
|
case "TicketSubscription.ticket":
|
|
if e.complexity.TicketSubscription.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TicketSubscription.Ticket(childComplexity), true
|
|
|
|
case "Tracker.acl":
|
|
if e.complexity.Tracker.ACL == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.ACL(childComplexity), true
|
|
|
|
case "Tracker.acls":
|
|
if e.complexity.Tracker.Acls == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Tracker_acls_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Tracker.Acls(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Tracker.created":
|
|
if e.complexity.Tracker.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.Created(childComplexity), true
|
|
|
|
case "Tracker.defaultACL":
|
|
if e.complexity.Tracker.DefaultACL == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.DefaultACL(childComplexity), true
|
|
|
|
case "Tracker.description":
|
|
if e.complexity.Tracker.Description == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.Description(childComplexity), true
|
|
|
|
case "Tracker.export":
|
|
if e.complexity.Tracker.Export == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.Export(childComplexity), true
|
|
|
|
case "Tracker.id":
|
|
if e.complexity.Tracker.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.ID(childComplexity), true
|
|
|
|
case "Tracker.labels":
|
|
if e.complexity.Tracker.Labels == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Tracker_labels_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Tracker.Labels(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Tracker.name":
|
|
if e.complexity.Tracker.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.Name(childComplexity), true
|
|
|
|
case "Tracker.owner":
|
|
if e.complexity.Tracker.Owner == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.Owner(childComplexity), true
|
|
|
|
case "Tracker.subscription":
|
|
if e.complexity.Tracker.Subscription == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.Subscription(childComplexity), true
|
|
|
|
case "Tracker.ticket":
|
|
if e.complexity.Tracker.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Tracker_ticket_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Tracker.Ticket(childComplexity, args["id"].(int)), true
|
|
|
|
case "Tracker.tickets":
|
|
if e.complexity.Tracker.Tickets == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Tracker_tickets_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Tracker.Tickets(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Tracker.updated":
|
|
if e.complexity.Tracker.Updated == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.Updated(childComplexity), true
|
|
|
|
case "Tracker.visibility":
|
|
if e.complexity.Tracker.Visibility == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Tracker.Visibility(childComplexity), true
|
|
|
|
case "TrackerACL.browse":
|
|
if e.complexity.TrackerACL.Browse == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerACL.Browse(childComplexity), true
|
|
|
|
case "TrackerACL.comment":
|
|
if e.complexity.TrackerACL.Comment == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerACL.Comment(childComplexity), true
|
|
|
|
case "TrackerACL.created":
|
|
if e.complexity.TrackerACL.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerACL.Created(childComplexity), true
|
|
|
|
case "TrackerACL.edit":
|
|
if e.complexity.TrackerACL.Edit == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerACL.Edit(childComplexity), true
|
|
|
|
case "TrackerACL.entity":
|
|
if e.complexity.TrackerACL.Entity == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerACL.Entity(childComplexity), true
|
|
|
|
case "TrackerACL.id":
|
|
if e.complexity.TrackerACL.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerACL.ID(childComplexity), true
|
|
|
|
case "TrackerACL.submit":
|
|
if e.complexity.TrackerACL.Submit == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerACL.Submit(childComplexity), true
|
|
|
|
case "TrackerACL.tracker":
|
|
if e.complexity.TrackerACL.Tracker == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerACL.Tracker(childComplexity), true
|
|
|
|
case "TrackerACL.triage":
|
|
if e.complexity.TrackerACL.Triage == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerACL.Triage(childComplexity), true
|
|
|
|
case "TrackerCursor.cursor":
|
|
if e.complexity.TrackerCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerCursor.Cursor(childComplexity), true
|
|
|
|
case "TrackerCursor.results":
|
|
if e.complexity.TrackerCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerCursor.Results(childComplexity), true
|
|
|
|
case "TrackerSubscription.created":
|
|
if e.complexity.TrackerSubscription.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerSubscription.Created(childComplexity), true
|
|
|
|
case "TrackerSubscription.id":
|
|
if e.complexity.TrackerSubscription.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerSubscription.ID(childComplexity), true
|
|
|
|
case "TrackerSubscription.tracker":
|
|
if e.complexity.TrackerSubscription.Tracker == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TrackerSubscription.Tracker(childComplexity), true
|
|
|
|
case "User.bio":
|
|
if e.complexity.User.Bio == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Bio(childComplexity), true
|
|
|
|
case "User.canonicalName":
|
|
if e.complexity.User.CanonicalName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.CanonicalName(childComplexity), true
|
|
|
|
case "User.created":
|
|
if e.complexity.User.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Created(childComplexity), true
|
|
|
|
case "User.email":
|
|
if e.complexity.User.Email == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Email(childComplexity), true
|
|
|
|
case "User.id":
|
|
if e.complexity.User.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.ID(childComplexity), true
|
|
|
|
case "User.location":
|
|
if e.complexity.User.Location == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Location(childComplexity), true
|
|
|
|
case "User.trackers":
|
|
if e.complexity.User.Trackers == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_User_trackers_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.User.Trackers(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "User.url":
|
|
if e.complexity.User.URL == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.URL(childComplexity), true
|
|
|
|
case "User.updated":
|
|
if e.complexity.User.Updated == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Updated(childComplexity), true
|
|
|
|
case "User.username":
|
|
if e.complexity.User.Username == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Username(childComplexity), true
|
|
|
|
case "UserMention.author":
|
|
if e.complexity.UserMention.Author == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.UserMention.Author(childComplexity), true
|
|
|
|
case "UserMention.eventType":
|
|
if e.complexity.UserMention.EventType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.UserMention.EventType(childComplexity), true
|
|
|
|
case "UserMention.mentioned":
|
|
if e.complexity.UserMention.Mentioned == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.UserMention.Mentioned(childComplexity), true
|
|
|
|
case "UserMention.ticket":
|
|
if e.complexity.UserMention.Ticket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.UserMention.Ticket(childComplexity), true
|
|
|
|
case "Version.deprecationDate":
|
|
if e.complexity.Version.DeprecationDate == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Version.DeprecationDate(childComplexity), true
|
|
|
|
case "Version.major":
|
|
if e.complexity.Version.Major == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Version.Major(childComplexity), true
|
|
|
|
case "Version.minor":
|
|
if e.complexity.Version.Minor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Version.Minor(childComplexity), true
|
|
|
|
case "Version.patch":
|
|
if e.complexity.Version.Patch == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Version.Patch(childComplexity), true
|
|
|
|
}
|
|
return 0, false
|
|
}
|
|
|
|
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
|
|
rc := graphql.GetOperationContext(ctx)
|
|
ec := executionContext{rc, e}
|
|
first := true
|
|
|
|
switch rc.Operation.Operation {
|
|
case ast.Query:
|
|
return func(ctx context.Context) *graphql.Response {
|
|
if !first {
|
|
return nil
|
|
}
|
|
first = false
|
|
data := ec._Query(ctx, rc.Operation.SelectionSet)
|
|
var buf bytes.Buffer
|
|
data.MarshalGQL(&buf)
|
|
|
|
return &graphql.Response{
|
|
Data: buf.Bytes(),
|
|
}
|
|
}
|
|
case ast.Mutation:
|
|
return func(ctx context.Context) *graphql.Response {
|
|
if !first {
|
|
return nil
|
|
}
|
|
first = false
|
|
data := ec._Mutation(ctx, rc.Operation.SelectionSet)
|
|
var buf bytes.Buffer
|
|
data.MarshalGQL(&buf)
|
|
|
|
return &graphql.Response{
|
|
Data: buf.Bytes(),
|
|
}
|
|
}
|
|
|
|
default:
|
|
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
|
|
}
|
|
}
|
|
|
|
type executionContext struct {
|
|
*graphql.OperationContext
|
|
*executableSchema
|
|
}
|
|
|
|
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
|
|
if ec.DisableIntrospection {
|
|
return nil, errors.New("introspection disabled")
|
|
}
|
|
return introspection.WrapSchema(parsedSchema), nil
|
|
}
|
|
|
|
func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
|
|
if ec.DisableIntrospection {
|
|
return nil, errors.New("introspection disabled")
|
|
}
|
|
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
|
|
}
|
|
|
|
var sources = []*ast.Source{
|
|
{Name: "graph/schema.graphqls", Input: `# This schema definition is available in the public domain, or under the terms
|
|
# of CC-0, at your choice.
|
|
scalar Cursor
|
|
scalar Time
|
|
scalar URL
|
|
scalar Upload
|
|
|
|
"Used to provide a human-friendly description of an access scope"
|
|
directive @scopehelp(details: String!) on ENUM_VALUE
|
|
|
|
enum AccessScope {
|
|
PROFILE @scopehelp(details: "profile information")
|
|
TRACKERS @scopehelp(details: "trackers")
|
|
TICKETS @scopehelp(details: "tickets")
|
|
ACLS @scopehelp(details: "access control lists")
|
|
EVENTS @scopehelp(details: "events")
|
|
SUBSCRIPTIONS @scopehelp(details: "tracker & ticket subscriptions")
|
|
}
|
|
|
|
enum AccessKind {
|
|
RO @scopehelp(details: "read")
|
|
RW @scopehelp(details: "read and write")
|
|
}
|
|
|
|
"""
|
|
Decorates fields for which access requires a particular OAuth 2.0 scope with
|
|
read or write access.
|
|
"""
|
|
directive @access(scope: AccessScope!, kind: AccessKind!) on FIELD_DEFINITION
|
|
|
|
# https://semver.org
|
|
type Version {
|
|
major: Int!
|
|
minor: Int!
|
|
patch: Int!
|
|
|
|
"""
|
|
If this API version is scheduled for deprecation, this is the date on which
|
|
it will stop working; or null if this API version is not scheduled for
|
|
deprecation.
|
|
"""
|
|
deprecationDate: Time
|
|
}
|
|
|
|
interface Entity {
|
|
canonicalName: String!
|
|
}
|
|
|
|
type User implements Entity {
|
|
id: Int!
|
|
created: Time!
|
|
updated: Time!
|
|
canonicalName: String!
|
|
username: String!
|
|
email: String!
|
|
url: String
|
|
location: String
|
|
bio: String
|
|
|
|
trackers(cursor: Cursor): TrackerCursor! @access(scope: TRACKERS, kind: RO)
|
|
}
|
|
|
|
type EmailAddress implements Entity {
|
|
canonicalName: String!
|
|
|
|
"""
|
|
"jdoe@example.org" of "Jane Doe <jdoe@example.org>"
|
|
"""
|
|
mailbox: String!
|
|
"""
|
|
"Jane Doe" of "Jane Doe <jdoe@example.org>"
|
|
"""
|
|
name: String
|
|
}
|
|
|
|
type ExternalUser implements Entity {
|
|
canonicalName: String!
|
|
|
|
"""
|
|
<service>:<service specific details...>
|
|
e.g. github:ddevault
|
|
"""
|
|
externalId: String!
|
|
"The canonical external URL for this user, e.g. https://github.com/ddevault"
|
|
externalUrl: String
|
|
}
|
|
|
|
enum Visibility {
|
|
PUBLIC
|
|
UNLISTED
|
|
PRIVATE
|
|
}
|
|
|
|
type Tracker {
|
|
id: Int!
|
|
created: Time!
|
|
updated: Time!
|
|
owner: Entity! @access(scope: PROFILE, kind: RO)
|
|
name: String!
|
|
description: String
|
|
visibility: Visibility!
|
|
|
|
ticket(id: Int!): Ticket! @access(scope: TICKETS, kind: RO)
|
|
tickets(cursor: Cursor): TicketCursor! @access(scope: TICKETS, kind: RO)
|
|
labels(cursor: Cursor): LabelCursor!
|
|
|
|
"""
|
|
If the authenticated user is subscribed to this tracker, this is that
|
|
subscription.
|
|
"""
|
|
subscription: TrackerSubscription @access(scope: SUBSCRIPTIONS, kind: RO)
|
|
|
|
"""
|
|
The access control list entry (or the default ACL) which describes the
|
|
authenticated user's permissions with respect to this tracker.
|
|
"""
|
|
acl: ACL
|
|
|
|
# Only available to the tracker owner:
|
|
defaultACL: DefaultACL!
|
|
acls(cursor: Cursor): ACLCursor! @access(scope: ACLS, kind: RO)
|
|
|
|
"""
|
|
Returns a URL from which the tracker owner may download a gzipped JSON
|
|
archive of the tracker.
|
|
"""
|
|
export: URL!
|
|
}
|
|
|
|
enum TicketStatus {
|
|
REPORTED
|
|
CONFIRMED
|
|
IN_PROGRESS
|
|
PENDING
|
|
RESOLVED
|
|
}
|
|
|
|
enum TicketResolution {
|
|
UNRESOLVED
|
|
FIXED
|
|
IMPLEMENTED
|
|
WONT_FIX
|
|
BY_DESIGN
|
|
INVALID
|
|
DUPLICATE
|
|
NOT_OUR_BUG
|
|
}
|
|
|
|
enum Authenticity {
|
|
"""
|
|
The server vouches for this information as entered verbatim by the
|
|
attributed entity.
|
|
"""
|
|
AUTHENTIC
|
|
"""
|
|
The server does not vouch for this information as entered by the attributed
|
|
entity, no authentication was provided.
|
|
"""
|
|
UNAUTHENTICATED
|
|
"""
|
|
The server has evidence that the information has likely been manipulated by
|
|
a third-party.
|
|
"""
|
|
TAMPERED
|
|
}
|
|
|
|
type Ticket {
|
|
"""
|
|
The ticket ID is unique within each tracker, but is not globally unique.
|
|
The first ticket opened on a given tracker will have ID 1, then 2, and so
|
|
on.
|
|
"""
|
|
id: Int!
|
|
|
|
created: Time!
|
|
updated: Time!
|
|
submitter: Entity! @access(scope: PROFILE, kind: RO)
|
|
tracker: Tracker! @access(scope: TRACKERS, kind: RO)
|
|
|
|
"""
|
|
Canonical ticket reference string; may be used in comments to identify the
|
|
ticket from anywhere.
|
|
"""
|
|
ref: String!
|
|
|
|
subject: String!
|
|
body: String
|
|
status: TicketStatus!
|
|
resolution: TicketResolution!
|
|
authenticity: Authenticity!
|
|
|
|
labels: [Label!]!
|
|
assignees: [Entity!]! @access(scope: PROFILE, kind: RO)
|
|
events(cursor: Cursor): EventCursor! @access(scope: EVENTS, kind: RO)
|
|
|
|
"""
|
|
If the authenticated user is subscribed to this ticket, this is that
|
|
subscription.
|
|
"""
|
|
subscription: TicketSubscription @access(scope: SUBSCRIPTIONS, kind: RO)
|
|
}
|
|
|
|
interface ACL {
|
|
"Permission to view tickets"
|
|
browse: Boolean!
|
|
"Permission to submit tickets"
|
|
submit: Boolean!
|
|
"Permission to comment on tickets"
|
|
comment: Boolean!
|
|
"Permission to edit tickets"
|
|
edit: Boolean!
|
|
"Permission to resolve, re-open, transfer, or label tickets"
|
|
triage: Boolean!
|
|
}
|
|
|
|
"""
|
|
These ACLs are configured for specific entities, and may be used to expand or
|
|
constrain the rights of a participant.
|
|
"""
|
|
type TrackerACL implements ACL {
|
|
id: Int!
|
|
created: Time!
|
|
tracker: Tracker! @access(scope: TRACKERS, kind: RO)
|
|
entity: Entity! @access(scope: PROFILE, kind: RO)
|
|
|
|
browse: Boolean!
|
|
submit: Boolean!
|
|
comment: Boolean!
|
|
edit: Boolean!
|
|
triage: Boolean!
|
|
}
|
|
|
|
"""
|
|
These ACL policies are applied non-specifically, e.g. the default ACL for all
|
|
authenticated users.
|
|
"""
|
|
type DefaultACL implements ACL {
|
|
browse: Boolean!
|
|
submit: Boolean!
|
|
comment: Boolean!
|
|
edit: Boolean!
|
|
triage: Boolean!
|
|
}
|
|
|
|
type Label {
|
|
id: Int!
|
|
created: Time!
|
|
name: String!
|
|
tracker: Tracker! @access(scope: TRACKERS, kind: RO)
|
|
|
|
"In CSS hexadecimal format"
|
|
backgroundColor: String!
|
|
foregroundColor: String!
|
|
|
|
tickets(cursor: Cursor): TicketCursor! @access(scope: TICKETS, kind: RO)
|
|
}
|
|
|
|
enum EventType {
|
|
CREATED
|
|
COMMENT
|
|
STATUS_CHANGE
|
|
LABEL_ADDED
|
|
LABEL_REMOVED
|
|
ASSIGNED_USER
|
|
UNASSIGNED_USER
|
|
USER_MENTIONED
|
|
TICKET_MENTIONED
|
|
}
|
|
|
|
"""
|
|
Represents an event which affects a ticket. Multiple changes can occur in a
|
|
single event, and are enumerated in the "changes" field.
|
|
"""
|
|
type Event {
|
|
id: Int!
|
|
created: Time!
|
|
changes: [EventDetail!]!
|
|
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
}
|
|
|
|
interface EventDetail {
|
|
eventType: EventType!
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
}
|
|
|
|
type Created implements EventDetail {
|
|
eventType: EventType!
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
author: Entity! @access(scope: PROFILE, kind: RO)
|
|
}
|
|
|
|
type Assignment implements EventDetail {
|
|
eventType: EventType!
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
|
|
assigner: Entity! @access(scope: PROFILE, kind: RO)
|
|
assignee: Entity! @access(scope: PROFILE, kind: RO)
|
|
}
|
|
|
|
type Comment implements EventDetail {
|
|
eventType: EventType!
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
author: Entity! @access(scope: PROFILE, kind: RO)
|
|
|
|
text: String!
|
|
authenticity: Authenticity!
|
|
|
|
"If this comment has been edited, this field points to the new revision."
|
|
supersededBy: Comment
|
|
}
|
|
|
|
type LabelUpdate implements EventDetail {
|
|
eventType: EventType!
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
labeler: Entity! @access(scope: PROFILE, kind: RO)
|
|
label: Label!
|
|
}
|
|
|
|
type StatusChange implements EventDetail {
|
|
eventType: EventType!
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
editor: Entity! @access(scope: PROFILE, kind: RO)
|
|
|
|
oldStatus: TicketStatus!
|
|
newStatus: TicketStatus!
|
|
oldResolution: TicketResolution!
|
|
newResolution: TicketResolution!
|
|
}
|
|
|
|
type UserMention implements EventDetail {
|
|
eventType: EventType!
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
author: Entity! @access(scope: PROFILE, kind: RO)
|
|
mentioned: Entity! @access(scope: PROFILE, kind: RO)
|
|
}
|
|
|
|
type TicketMention implements EventDetail {
|
|
eventType: EventType!
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
author: Entity! @access(scope: PROFILE, kind: RO)
|
|
mentioned: Ticket! @access(scope: TICKETS, kind: RO)
|
|
}
|
|
|
|
interface ActivitySubscription {
|
|
id: Int!
|
|
created: Time!
|
|
}
|
|
|
|
"""
|
|
A tracker subscription will notify a participant of all activity for a
|
|
tracker, including all new tickets and their events.
|
|
"""
|
|
type TrackerSubscription implements ActivitySubscription {
|
|
id: Int!
|
|
created: Time!
|
|
tracker: Tracker! @access(scope: TRACKERS, kind: RO)
|
|
}
|
|
|
|
"""
|
|
A ticket subscription will notify a participant when activity occurs on a
|
|
ticket.
|
|
"""
|
|
type TicketSubscription implements ActivitySubscription {
|
|
id: Int!
|
|
created: Time!
|
|
ticket: Ticket! @access(scope: TICKETS, kind: RO)
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating trackers
|
|
|
|
If there are additional results available, the cursor object may be passed
|
|
back into the same endpoint to retrieve another page. If the cursor is null,
|
|
there are no remaining results to return.
|
|
"""
|
|
type TrackerCursor {
|
|
results: [Tracker!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating tickets
|
|
|
|
If there are additional results available, the cursor object may be passed
|
|
back into the same endpoint to retrieve another page. If the cursor is null,
|
|
there are no remaining results to return.
|
|
"""
|
|
type TicketCursor {
|
|
results: [Ticket!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating labels
|
|
|
|
If there are additional results available, the cursor object may be passed
|
|
back into the same endpoint to retrieve another page. If the cursor is null,
|
|
there are no remaining results to return.
|
|
"""
|
|
type LabelCursor {
|
|
results: [Label!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating access control list entries
|
|
|
|
If there are additional results available, the cursor object may be passed
|
|
back into the same endpoint to retrieve another page. If the cursor is null,
|
|
there are no remaining results to return.
|
|
"""
|
|
type ACLCursor {
|
|
results: [TrackerACL!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating events
|
|
|
|
If there are additional results available, the cursor object may be passed
|
|
back into the same endpoint to retrieve another page. If the cursor is null,
|
|
there are no remaining results to return.
|
|
"""
|
|
type EventCursor {
|
|
results: [Event!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating subscriptions
|
|
|
|
If there are additional results available, the cursor object may be passed
|
|
back into the same endpoint to retrieve another page. If the cursor is null,
|
|
there are no remaining results to return.
|
|
"""
|
|
type ActivitySubscriptionCursor {
|
|
results: [ActivitySubscription!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
type Query {
|
|
"Returns API version information."
|
|
version: Version!
|
|
|
|
"Returns the authenticated user."
|
|
me: User! @access(scope: PROFILE, kind: RO)
|
|
|
|
"Returns a specific user."
|
|
user(username: String!): User @access(scope: PROFILE, kind: RO)
|
|
|
|
"""
|
|
Returns trackers that the authenticated user has access to.
|
|
|
|
NOTE: in this version of the API, only trackers owned by the authenticated
|
|
user are returned, but in the future the default behavior will be to return
|
|
all trackers that the user either (1) has been given explicit access to via
|
|
ACLs or (2) has implicit access to either by ownership or group membership.
|
|
"""
|
|
trackers(cursor: Cursor): TrackerCursor @access(scope: TRACKERS, kind: RO)
|
|
|
|
"Returns a specific tracker by ID."
|
|
tracker(id: Int!): Tracker @access(scope: TRACKERS, kind: RO)
|
|
|
|
"Returns a specific tracker, owned by the authenticated user."
|
|
trackerByName(name: String!): Tracker @access(scope: TRACKERS, kind: RO)
|
|
|
|
"""
|
|
Returns a specific tracker, owned by the given canonical name (e.g.
|
|
"~sircmpwn").
|
|
"""
|
|
trackerByOwner(owner: String!, tracker: String!): Tracker @access(scope: TRACKERS, kind: RO)
|
|
|
|
# TODO: Add ticket by tracker ID and ticket ID
|
|
|
|
"""
|
|
List of events which the authenticated user is subscribed to or implicated
|
|
in, ordered by the event date (recent events first).
|
|
"""
|
|
events(cursor: Cursor): EventCursor @access(scope: EVENTS, kind: RO)
|
|
|
|
"List of subscriptions of the authenticated user."
|
|
subscriptions(cursor: Cursor): ActivitySubscriptionCursor @access(scope: SUBSCRIPTIONS, kind: RO)
|
|
}
|
|
|
|
"You may omit any fields to leave them unchanged."
|
|
# TODO: Allow users to change the name of a tracker
|
|
input TrackerInput {
|
|
description: String
|
|
visibility: Visibility
|
|
}
|
|
|
|
"You may omit any fields to leave them unchanged."
|
|
input UpdateLabelInput {
|
|
name: String
|
|
foregroundColor: String
|
|
backgroundColor: String
|
|
}
|
|
|
|
input ACLInput {
|
|
"Permission to view tickets"
|
|
browse: Boolean!
|
|
"Permission to submit tickets"
|
|
submit: Boolean!
|
|
"Permission to comment on tickets"
|
|
comment: Boolean!
|
|
"Permission to edit tickets"
|
|
edit: Boolean!
|
|
"Permission to resolve, re-open, transfer, or label tickets"
|
|
triage: Boolean!
|
|
}
|
|
|
|
"""
|
|
This is used for importing tickets from third-party services, and may only be
|
|
used by the tracker owner. It causes a ticket submission, update, or comment
|
|
to be attributed to an external user and appear as if it were submitted at a
|
|
specific time.
|
|
"""
|
|
input ImportInput {
|
|
created: Time!
|
|
"""
|
|
External user ID. By convention this should be "service:username", e.g.
|
|
"codeberg:ddevault".
|
|
"""
|
|
externalId: String!
|
|
"""
|
|
A URL at which the user's external profile may be found, e.g.
|
|
"https://codeberg.org/ddevault".
|
|
"""
|
|
externalUrl: String!
|
|
}
|
|
|
|
input SubmitTicketInput {
|
|
subject: String!
|
|
body: String
|
|
|
|
# These fields are meant for use when importing tickets from third-party
|
|
# services, and may only be used by the tracker owner.
|
|
# TODO: Use ImportInput here
|
|
created: Time
|
|
externalId: String
|
|
externalUrl: String
|
|
}
|
|
|
|
"""
|
|
You may omit any fields to leave them unchanged. To remove the ticket body,
|
|
set it to null.
|
|
"""
|
|
input UpdateTicketInput {
|
|
subject: String
|
|
body: String
|
|
|
|
"For use by the tracker owner only"
|
|
import: ImportInput
|
|
}
|
|
|
|
"""
|
|
You may omit the status or resolution fields to leave them unchanged (or if
|
|
you do not have permission to change them). "resolution" is required if
|
|
status is RESOLVED.
|
|
"""
|
|
input SubmitCommentInput {
|
|
text: String!
|
|
status: TicketStatus
|
|
resolution: TicketResolution
|
|
|
|
"For use by the tracker owner only"
|
|
import: ImportInput
|
|
}
|
|
|
|
"""
|
|
"resolution" is required if status is RESOLVED.
|
|
"""
|
|
input UpdateStatusInput {
|
|
status: TicketStatus!
|
|
resolution: TicketResolution
|
|
|
|
"For use by the tracker owner only"
|
|
import: ImportInput
|
|
}
|
|
|
|
type Mutation {
|
|
"""
|
|
Creates a new bug tracker. If specified, the 'import' field specifies a
|
|
gzipped dump of a tracker to populate tickets from; see Tracker.export.
|
|
"""
|
|
createTracker(
|
|
name: String!,
|
|
description: String,
|
|
visibility: Visibility!,
|
|
import: Upload): Tracker @access(scope: TRACKERS, kind: RW)
|
|
|
|
"Updates an existing bug tracker"
|
|
updateTracker(
|
|
id: Int!,
|
|
input: TrackerInput!): Tracker @access(scope: TRACKERS, kind: RW)
|
|
|
|
"Deletes a bug tracker"
|
|
deleteTracker(id: Int!): Tracker @access(scope: TRACKERS, kind: RW)
|
|
|
|
"Adds or updates the ACL for a specific user on a bug tracker"
|
|
updateUserACL(
|
|
trackerId: Int!,
|
|
userId: Int!,
|
|
input: ACLInput!): TrackerACL @access(scope: ACLS, kind: RW)
|
|
|
|
# "Adds or updates the ACL for an email address on a bug tracker"
|
|
# TODO: This requires internal changes
|
|
#updateSenderACL(
|
|
# trackerId: Int!,
|
|
# address: String!,
|
|
# input: ACLInput!): TrackerACL @access(scope: ACLS, kind: RW)
|
|
|
|
"""
|
|
Updates the default ACL for a bug tracker, which applies to users and
|
|
senders for whom a more specific ACL does not exist.
|
|
"""
|
|
updateTrackerACL(
|
|
trackerId: Int!,
|
|
input: ACLInput!): DefaultACL @access(scope: ACLS, kind: RW)
|
|
|
|
"""
|
|
Removes a tracker ACL. Following this change, the default tracker ACL will
|
|
apply to this user.
|
|
"""
|
|
deleteACL(id: Int!): TrackerACL @access(scope: ACLS, kind: RW)
|
|
|
|
"Subscribes to all email notifications for a tracker"
|
|
trackerSubscribe(
|
|
trackerId: Int!): TrackerSubscription @access(scope: SUBSCRIPTIONS, kind: RW)
|
|
|
|
"""
|
|
Unsubscribes from email notifications for a tracker. If "tickets" is true,
|
|
also unsubscribe from all tickets on this tracker.
|
|
"""
|
|
trackerUnsubscribe(
|
|
trackerId: Int!,
|
|
tickets: Boolean!): TrackerSubscription @access(scope: SUBSCRIPTIONS, kind: RW)
|
|
|
|
"Subscribes to all email notifications for a ticket"
|
|
ticketSubscribe(
|
|
trackerId: Int!,
|
|
ticketId: Int!): TicketSubscription @access(scope: SUBSCRIPTIONS, kind: RW)
|
|
|
|
"Unsubscribes from email notifications for a ticket"
|
|
ticketUnsubscribe(
|
|
trackerId: Int!,
|
|
ticketId: Int!): TicketSubscription @access(scope: SUBSCRIPTIONS, kind: RW)
|
|
|
|
"""
|
|
Creates a new ticket label for a tracker. The colors must be in CSS
|
|
hexadecimal RGB format "#RRGGBB", i.e. "#000000" for black and "#FF0000" for
|
|
red.
|
|
"""
|
|
createLabel(trackerId: Int!, name: String!,
|
|
foreground: String!, background: String!): Label @access(scope: TRACKERS, kind: RW)
|
|
|
|
"Changes the name or colors for a label."
|
|
updateLabel(id: Int!, input: UpdateLabelInput!): Label @access(scope: TRACKERS, kind: RW)
|
|
|
|
"""
|
|
Deletes a label, removing it from any tickets which currently have it
|
|
applied.
|
|
"""
|
|
deleteLabel(id: Int!): Label @access(scope: TRACKERS, kind: RW)
|
|
|
|
"Creates a new ticket."
|
|
submitTicket(trackerId: Int!,
|
|
input: SubmitTicketInput!): Ticket @access(scope: TICKETS, kind: RW)
|
|
|
|
"Updates a ticket's subject or body"
|
|
updateTicket(trackerId: Int!, ticketId: Int!,
|
|
input: UpdateTicketInput!): Ticket @access(scope: TICKETS, kind: RW)
|
|
|
|
"Updates the status or resolution of a ticket"
|
|
updateTicketStatus(trackerId: Int!, ticketId: Int!,
|
|
input: UpdateStatusInput!): Event @access(scope: TICKETS, kind: RW)
|
|
|
|
"Submits a comment for a ticket"
|
|
submitComment(trackerId: Int!, ticketId: Int!,
|
|
input: SubmitCommentInput!): Event @access(scope: TICKETS, kind: RW)
|
|
|
|
"Adds a user to the list of assigned users for a ticket"
|
|
assignUser(trackerId: Int!, ticketId: Int!,
|
|
userId: Int!): Event @access(scope: TICKETS, kind: RW)
|
|
|
|
"Removes a user from the list of assigned users for a ticket"
|
|
unassignUser(trackerId: Int!, ticketId: Int!,
|
|
userId: Int!): Event @access(scope: TICKETS, kind: RW)
|
|
|
|
"Adds a label to the list of labels for a ticket"
|
|
labelTicket(trackerId: Int!, ticketId: Int!,
|
|
labelId: Int!): Event @access(scope: TICKETS, kind: RW)
|
|
|
|
"Removes a list from the list of labels for a ticket"
|
|
unlabelTicket(trackerId: Int!, ticketId: Int!,
|
|
labelId: Int!): Event @access(scope: TICKETS, kind: RW)
|
|
}
|
|
`, BuiltIn: false},
|
|
}
|
|
var parsedSchema = gqlparser.MustLoadSchema(sources...)
|
|
|
|
// endregion ************************** generated!.gotpl **************************
|
|
|
|
// region ***************************** args.gotpl *****************************
|
|
|
|
func (ec *executionContext) dir_access_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 model.AccessScope
|
|
if tmp, ok := rawArgs["scope"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scope"))
|
|
arg0, err = ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["scope"] = arg0
|
|
var arg1 model.AccessKind
|
|
if tmp, ok := rawArgs["kind"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind"))
|
|
arg1, err = ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["kind"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) dir_scopehelp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["details"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("details"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["details"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Label_tickets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *model1.Cursor
|
|
if tmp, ok := rawArgs["cursor"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cursor"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_assignUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["ticketId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ticketId"] = arg1
|
|
var arg2 int
|
|
if tmp, ok := rawArgs["userId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userId"))
|
|
arg2, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["userId"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_createLabel_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 string
|
|
if tmp, ok := rawArgs["name"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["name"] = arg1
|
|
var arg2 string
|
|
if tmp, ok := rawArgs["foreground"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foreground"))
|
|
arg2, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["foreground"] = arg2
|
|
var arg3 string
|
|
if tmp, ok := rawArgs["background"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("background"))
|
|
arg3, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["background"] = arg3
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_createTracker_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["name"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["name"] = arg0
|
|
var arg1 *string
|
|
if tmp, ok := rawArgs["description"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description"))
|
|
arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["description"] = arg1
|
|
var arg2 model.Visibility
|
|
if tmp, ok := rawArgs["visibility"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("visibility"))
|
|
arg2, err = ec.unmarshalNVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["visibility"] = arg2
|
|
var arg3 *graphql.Upload
|
|
if tmp, ok := rawArgs["import"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("import"))
|
|
arg3, err = ec.unmarshalOUpload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["import"] = arg3
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_deleteACL_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_deleteLabel_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_deleteTracker_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_labelTicket_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["ticketId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ticketId"] = arg1
|
|
var arg2 int
|
|
if tmp, ok := rawArgs["labelId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelId"))
|
|
arg2, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["labelId"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_submitComment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["ticketId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ticketId"] = arg1
|
|
var arg2 model.SubmitCommentInput
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg2, err = ec.unmarshalNSubmitCommentInput2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐSubmitCommentInput(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_submitTicket_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 model.SubmitTicketInput
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg1, err = ec.unmarshalNSubmitTicketInput2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐSubmitTicketInput(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_ticketSubscribe_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["ticketId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ticketId"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_ticketUnsubscribe_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["ticketId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ticketId"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_trackerSubscribe_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_trackerUnsubscribe_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 bool
|
|
if tmp, ok := rawArgs["tickets"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tickets"))
|
|
arg1, err = ec.unmarshalNBoolean2bool(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["tickets"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_unassignUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["ticketId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ticketId"] = arg1
|
|
var arg2 int
|
|
if tmp, ok := rawArgs["userId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userId"))
|
|
arg2, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["userId"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_unlabelTicket_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["ticketId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ticketId"] = arg1
|
|
var arg2 int
|
|
if tmp, ok := rawArgs["labelId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelId"))
|
|
arg2, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["labelId"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateLabel_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
var arg1 map[string]interface{}
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg1, err = ec.unmarshalNUpdateLabelInput2map(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateTicketStatus_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["ticketId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ticketId"] = arg1
|
|
var arg2 model.UpdateStatusInput
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg2, err = ec.unmarshalNUpdateStatusInput2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUpdateStatusInput(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateTicket_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["ticketId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ticketId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ticketId"] = arg1
|
|
var arg2 map[string]interface{}
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg2, err = ec.unmarshalNUpdateTicketInput2map(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateTrackerACL_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 model.ACLInput
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg1, err = ec.unmarshalNACLInput2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACLInput(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateTracker_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
var arg1 map[string]interface{}
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg1, err = ec.unmarshalNTrackerInput2map(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateUserACL_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["trackerId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trackerId"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["trackerId"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["userId"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("userId"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["userId"] = arg1
|
|
var arg2 model.ACLInput
|
|
if tmp, ok := rawArgs["input"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
|
|
arg2, err = ec.unmarshalNACLInput2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACLInput(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["name"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["name"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_events_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *model1.Cursor
|
|
if tmp, ok := rawArgs["cursor"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cursor"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_subscriptions_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *model1.Cursor
|
|
if tmp, ok := rawArgs["cursor"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cursor"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_trackerByName_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["name"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["name"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_trackerByOwner_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["owner"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["owner"] = arg0
|
|
var arg1 string
|
|
if tmp, ok := rawArgs["tracker"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tracker"))
|
|
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["tracker"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_tracker_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_trackers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *model1.Cursor
|
|
if tmp, ok := rawArgs["cursor"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cursor"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 string
|
|
if tmp, ok := rawArgs["username"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("username"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["username"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Ticket_events_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *model1.Cursor
|
|
if tmp, ok := rawArgs["cursor"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cursor"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Tracker_acls_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *model1.Cursor
|
|
if tmp, ok := rawArgs["cursor"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cursor"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Tracker_labels_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *model1.Cursor
|
|
if tmp, ok := rawArgs["cursor"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cursor"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Tracker_ticket_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 int
|
|
if tmp, ok := rawArgs["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Tracker_tickets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *model1.Cursor
|
|
if tmp, ok := rawArgs["cursor"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cursor"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_User_trackers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 *model1.Cursor
|
|
if tmp, ok := rawArgs["cursor"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cursor"))
|
|
arg0, err = ec.unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cursor"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 bool
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["includeDeprecated"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 bool
|
|
if tmp, ok := rawArgs["includeDeprecated"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
|
|
arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["includeDeprecated"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
// endregion ***************************** args.gotpl *****************************
|
|
|
|
// region ************************** directives.gotpl **************************
|
|
|
|
// endregion ************************** directives.gotpl **************************
|
|
|
|
// region **************************** field.gotpl *****************************
|
|
|
|
func (ec *executionContext) _ACLCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.ACLCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "ACLCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Results, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.TrackerACL)
|
|
fc.Result = res
|
|
return ec.marshalNTrackerACL2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerACLᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _ACLCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ACLCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "ACLCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Cursor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model1.Cursor)
|
|
fc.Result = res
|
|
return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _ActivitySubscriptionCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.ActivitySubscriptionCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "ActivitySubscriptionCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Results, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]model.ActivitySubscription)
|
|
fc.Result = res
|
|
return ec.marshalNActivitySubscription2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐActivitySubscriptionᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _ActivitySubscriptionCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ActivitySubscriptionCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "ActivitySubscriptionCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Cursor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model1.Cursor)
|
|
fc.Result = res
|
|
return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Assignment_eventType(ctx context.Context, field graphql.CollectedField, obj *model.Assignment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Assignment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EventType, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.EventType)
|
|
fc.Result = res
|
|
return ec.marshalNEventType2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Assignment_ticket(ctx context.Context, field graphql.CollectedField, obj *model.Assignment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Assignment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Assignment().Ticket(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Assignment_assigner(ctx context.Context, field graphql.CollectedField, obj *model.Assignment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Assignment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Assignment().Assigner(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Assignment_assignee(ctx context.Context, field graphql.CollectedField, obj *model.Assignment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Assignment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Assignment().Assignee(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Comment_eventType(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Comment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EventType, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.EventType)
|
|
fc.Result = res
|
|
return ec.marshalNEventType2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Comment_ticket(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Comment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Comment().Ticket(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Comment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Comment().Author(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Comment_text(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Comment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Comment().Text(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Comment_authenticity(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Comment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Comment().Authenticity(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Authenticity)
|
|
fc.Result = res
|
|
return ec.marshalNAuthenticity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAuthenticity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Comment_supersededBy(ctx context.Context, field graphql.CollectedField, obj *model.Comment) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Comment",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Comment().SupersededBy(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Comment)
|
|
fc.Result = res
|
|
return ec.marshalOComment2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐComment(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Created_eventType(ctx context.Context, field graphql.CollectedField, obj *model.Created) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Created",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EventType, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.EventType)
|
|
fc.Result = res
|
|
return ec.marshalNEventType2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Created_ticket(ctx context.Context, field graphql.CollectedField, obj *model.Created) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Created",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Created().Ticket(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Created_author(ctx context.Context, field graphql.CollectedField, obj *model.Created) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Created",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Created().Author(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _DefaultACL_browse(ctx context.Context, field graphql.CollectedField, obj *model.DefaultACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "DefaultACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Browse, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _DefaultACL_submit(ctx context.Context, field graphql.CollectedField, obj *model.DefaultACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "DefaultACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Submit, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _DefaultACL_comment(ctx context.Context, field graphql.CollectedField, obj *model.DefaultACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "DefaultACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Comment, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _DefaultACL_edit(ctx context.Context, field graphql.CollectedField, obj *model.DefaultACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "DefaultACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Edit, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _DefaultACL_triage(ctx context.Context, field graphql.CollectedField, obj *model.DefaultACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "DefaultACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Triage, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _EmailAddress_canonicalName(ctx context.Context, field graphql.CollectedField, obj *model.EmailAddress) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "EmailAddress",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CanonicalName(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _EmailAddress_mailbox(ctx context.Context, field graphql.CollectedField, obj *model.EmailAddress) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "EmailAddress",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Mailbox, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _EmailAddress_name(ctx context.Context, field graphql.CollectedField, obj *model.EmailAddress) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "EmailAddress",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Event_id(ctx context.Context, field graphql.CollectedField, obj *model.Event) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Event",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Event_created(ctx context.Context, field graphql.CollectedField, obj *model.Event) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Event",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Created, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Event_changes(ctx context.Context, field graphql.CollectedField, obj *model.Event) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Event",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Changes(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]model.EventDetail)
|
|
fc.Result = res
|
|
return ec.marshalNEventDetail2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventDetailᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Event_ticket(ctx context.Context, field graphql.CollectedField, obj *model.Event) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Event",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Event().Ticket(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _EventCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.EventCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "EventCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Results, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Event)
|
|
fc.Result = res
|
|
return ec.marshalNEvent2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _EventCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.EventCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "EventCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Cursor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model1.Cursor)
|
|
fc.Result = res
|
|
return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _ExternalUser_canonicalName(ctx context.Context, field graphql.CollectedField, obj *model.ExternalUser) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "ExternalUser",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CanonicalName(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _ExternalUser_externalId(ctx context.Context, field graphql.CollectedField, obj *model.ExternalUser) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "ExternalUser",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ExternalID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _ExternalUser_externalUrl(ctx context.Context, field graphql.CollectedField, obj *model.ExternalUser) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "ExternalUser",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ExternalURL, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Label_id(ctx context.Context, field graphql.CollectedField, obj *model.Label) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Label",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Label_created(ctx context.Context, field graphql.CollectedField, obj *model.Label) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Label",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Created, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Label_name(ctx context.Context, field graphql.CollectedField, obj *model.Label) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Label",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Label_tracker(ctx context.Context, field graphql.CollectedField, obj *model.Label) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Label",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Label().Tracker(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalNTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Label_backgroundColor(ctx context.Context, field graphql.CollectedField, obj *model.Label) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Label",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.BackgroundColor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Label_foregroundColor(ctx context.Context, field graphql.CollectedField, obj *model.Label) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Label",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ForegroundColor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Label_tickets(ctx context.Context, field graphql.CollectedField, obj *model.Label) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Label",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Label_tickets_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Label().Tickets(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TicketCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TicketCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TicketCursor)
|
|
fc.Result = res
|
|
return ec.marshalNTicketCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _LabelCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.LabelCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "LabelCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Results, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Label)
|
|
fc.Result = res
|
|
return ec.marshalNLabel2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabelᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _LabelCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.LabelCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "LabelCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Cursor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model1.Cursor)
|
|
fc.Result = res
|
|
return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _LabelUpdate_eventType(ctx context.Context, field graphql.CollectedField, obj *model.LabelUpdate) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "LabelUpdate",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EventType, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.EventType)
|
|
fc.Result = res
|
|
return ec.marshalNEventType2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _LabelUpdate_ticket(ctx context.Context, field graphql.CollectedField, obj *model.LabelUpdate) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "LabelUpdate",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.LabelUpdate().Ticket(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _LabelUpdate_labeler(ctx context.Context, field graphql.CollectedField, obj *model.LabelUpdate) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "LabelUpdate",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.LabelUpdate().Labeler(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _LabelUpdate_label(ctx context.Context, field graphql.CollectedField, obj *model.LabelUpdate) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "LabelUpdate",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.LabelUpdate().Label(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Label)
|
|
fc.Result = res
|
|
return ec.marshalNLabel2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabel(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_createTracker(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_createTracker_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().CreateTracker(rctx, args["name"].(string), args["description"].(*string), args["visibility"].(model.Visibility), args["import"].(*graphql.Upload))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalOTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateTracker(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_updateTracker_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().UpdateTracker(rctx, args["id"].(int), args["input"].(map[string]interface{}))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalOTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_deleteTracker(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_deleteTracker_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().DeleteTracker(rctx, args["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalOTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateUserACL(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_updateUserACL_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().UpdateUserACL(rctx, args["trackerId"].(int), args["userId"].(int), args["input"].(model.ACLInput))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TrackerACL); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TrackerACL`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TrackerACL)
|
|
fc.Result = res
|
|
return ec.marshalOTrackerACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateTrackerACL(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_updateTrackerACL_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().UpdateTrackerACL(rctx, args["trackerId"].(int), args["input"].(model.ACLInput))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.DefaultACL); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.DefaultACL`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.DefaultACL)
|
|
fc.Result = res
|
|
return ec.marshalODefaultACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐDefaultACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_deleteACL(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_deleteACL_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().DeleteACL(rctx, args["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TrackerACL); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TrackerACL`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TrackerACL)
|
|
fc.Result = res
|
|
return ec.marshalOTrackerACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_trackerSubscribe(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_trackerSubscribe_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().TrackerSubscribe(rctx, args["trackerId"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TrackerSubscription); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TrackerSubscription`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TrackerSubscription)
|
|
fc.Result = res
|
|
return ec.marshalOTrackerSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerSubscription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_trackerUnsubscribe(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_trackerUnsubscribe_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().TrackerUnsubscribe(rctx, args["trackerId"].(int), args["tickets"].(bool))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TrackerSubscription); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TrackerSubscription`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TrackerSubscription)
|
|
fc.Result = res
|
|
return ec.marshalOTrackerSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerSubscription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_ticketSubscribe(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_ticketSubscribe_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().TicketSubscribe(rctx, args["trackerId"].(int), args["ticketId"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TicketSubscription); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TicketSubscription`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TicketSubscription)
|
|
fc.Result = res
|
|
return ec.marshalOTicketSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketSubscription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_ticketUnsubscribe(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_ticketUnsubscribe_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().TicketUnsubscribe(rctx, args["trackerId"].(int), args["ticketId"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TicketSubscription); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TicketSubscription`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TicketSubscription)
|
|
fc.Result = res
|
|
return ec.marshalOTicketSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketSubscription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_createLabel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_createLabel_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().CreateLabel(rctx, args["trackerId"].(int), args["name"].(string), args["foreground"].(string), args["background"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Label); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Label`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Label)
|
|
fc.Result = res
|
|
return ec.marshalOLabel2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabel(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateLabel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_updateLabel_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().UpdateLabel(rctx, args["id"].(int), args["input"].(map[string]interface{}))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Label); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Label`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Label)
|
|
fc.Result = res
|
|
return ec.marshalOLabel2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabel(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_deleteLabel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_deleteLabel_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().DeleteLabel(rctx, args["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Label); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Label`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Label)
|
|
fc.Result = res
|
|
return ec.marshalOLabel2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabel(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_submitTicket(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_submitTicket_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().SubmitTicket(rctx, args["trackerId"].(int), args["input"].(model.SubmitTicketInput))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalOTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateTicket(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_updateTicket_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().UpdateTicket(rctx, args["trackerId"].(int), args["ticketId"].(int), args["input"].(map[string]interface{}))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalOTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateTicketStatus(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_updateTicketStatus_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().UpdateTicketStatus(rctx, args["trackerId"].(int), args["ticketId"].(int), args["input"].(model.UpdateStatusInput))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Event); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Event`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Event)
|
|
fc.Result = res
|
|
return ec.marshalOEvent2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEvent(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_submitComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_submitComment_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().SubmitComment(rctx, args["trackerId"].(int), args["ticketId"].(int), args["input"].(model.SubmitCommentInput))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Event); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Event`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Event)
|
|
fc.Result = res
|
|
return ec.marshalOEvent2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEvent(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_assignUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_assignUser_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().AssignUser(rctx, args["trackerId"].(int), args["ticketId"].(int), args["userId"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Event); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Event`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Event)
|
|
fc.Result = res
|
|
return ec.marshalOEvent2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEvent(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_unassignUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_unassignUser_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().UnassignUser(rctx, args["trackerId"].(int), args["ticketId"].(int), args["userId"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Event); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Event`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Event)
|
|
fc.Result = res
|
|
return ec.marshalOEvent2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEvent(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_labelTicket(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_labelTicket_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().LabelTicket(rctx, args["trackerId"].(int), args["ticketId"].(int), args["labelId"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Event); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Event`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Event)
|
|
fc.Result = res
|
|
return ec.marshalOEvent2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEvent(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_unlabelTicket(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_unlabelTicket_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().UnlabelTicket(rctx, args["trackerId"].(int), args["ticketId"].(int), args["labelId"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RW")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Event); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Event`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Event)
|
|
fc.Result = res
|
|
return ec.marshalOEvent2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEvent(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_version(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Version(rctx)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Version)
|
|
fc.Result = res
|
|
return ec.marshalNVersion2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVersion(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_me(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Me(rctx)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.User); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.User`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.User)
|
|
fc.Result = res
|
|
return ec.marshalNUser2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_user_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().User(rctx, args["username"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.User); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.User`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.User)
|
|
fc.Result = res
|
|
return ec.marshalOUser2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_trackers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_trackers_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Trackers(rctx, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TrackerCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TrackerCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TrackerCursor)
|
|
fc.Result = res
|
|
return ec.marshalOTrackerCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_tracker(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_tracker_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Tracker(rctx, args["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalOTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_trackerByName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_trackerByName_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().TrackerByName(rctx, args["name"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalOTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_trackerByOwner(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_trackerByOwner_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().TrackerByOwner(rctx, args["owner"].(string), args["tracker"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalOTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_events(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_events_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Events(rctx, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EVENTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.EventCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.EventCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.EventCursor)
|
|
fc.Result = res
|
|
return ec.marshalOEventCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_subscriptions(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_subscriptions_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Subscriptions(rctx, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, nil, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.ActivitySubscriptionCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.ActivitySubscriptionCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.ActivitySubscriptionCursor)
|
|
fc.Result = res
|
|
return ec.marshalOActivitySubscriptionCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐActivitySubscriptionCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query___type_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectType(args["name"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectSchema()
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Schema)
|
|
fc.Result = res
|
|
return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _StatusChange_eventType(ctx context.Context, field graphql.CollectedField, obj *model.StatusChange) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "StatusChange",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EventType, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.EventType)
|
|
fc.Result = res
|
|
return ec.marshalNEventType2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _StatusChange_ticket(ctx context.Context, field graphql.CollectedField, obj *model.StatusChange) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "StatusChange",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.StatusChange().Ticket(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _StatusChange_editor(ctx context.Context, field graphql.CollectedField, obj *model.StatusChange) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "StatusChange",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.StatusChange().Editor(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _StatusChange_oldStatus(ctx context.Context, field graphql.CollectedField, obj *model.StatusChange) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "StatusChange",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.OldStatus, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.TicketStatus)
|
|
fc.Result = res
|
|
return ec.marshalNTicketStatus2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketStatus(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _StatusChange_newStatus(ctx context.Context, field graphql.CollectedField, obj *model.StatusChange) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "StatusChange",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.NewStatus, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.TicketStatus)
|
|
fc.Result = res
|
|
return ec.marshalNTicketStatus2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketStatus(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _StatusChange_oldResolution(ctx context.Context, field graphql.CollectedField, obj *model.StatusChange) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "StatusChange",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.OldResolution, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.TicketResolution)
|
|
fc.Result = res
|
|
return ec.marshalNTicketResolution2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketResolution(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _StatusChange_newResolution(ctx context.Context, field graphql.CollectedField, obj *model.StatusChange) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "StatusChange",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.NewResolution, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.TicketResolution)
|
|
fc.Result = res
|
|
return ec.marshalNTicketResolution2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketResolution(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_id(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_created(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Created, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_updated(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Updated, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_submitter(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Ticket().Submitter(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_tracker(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Ticket().Tracker(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalNTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_ref(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Ref(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_subject(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Subject, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_body(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Body, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_status(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Status(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.TicketStatus)
|
|
fc.Result = res
|
|
return ec.marshalNTicketStatus2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketStatus(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_resolution(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Resolution(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.TicketResolution)
|
|
fc.Result = res
|
|
return ec.marshalNTicketResolution2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketResolution(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_authenticity(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Authenticity(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Authenticity)
|
|
fc.Result = res
|
|
return ec.marshalNAuthenticity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAuthenticity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_labels(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Ticket().Labels(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Label)
|
|
fc.Result = res
|
|
return ec.marshalNLabel2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabelᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_assignees(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Ticket().Assignees(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.([]model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be []git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntityᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_events(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Ticket_events_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Ticket().Events(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EVENTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.EventCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.EventCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.EventCursor)
|
|
fc.Result = res
|
|
return ec.marshalNEventCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Ticket_subscription(ctx context.Context, field graphql.CollectedField, obj *model.Ticket) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Ticket",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Ticket().Subscription(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TicketSubscription); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TicketSubscription`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TicketSubscription)
|
|
fc.Result = res
|
|
return ec.marshalOTicketSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketSubscription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TicketCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.TicketCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TicketCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Results, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TicketCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.TicketCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TicketCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Cursor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model1.Cursor)
|
|
fc.Result = res
|
|
return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TicketMention_eventType(ctx context.Context, field graphql.CollectedField, obj *model.TicketMention) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TicketMention",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EventType, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.EventType)
|
|
fc.Result = res
|
|
return ec.marshalNEventType2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TicketMention_ticket(ctx context.Context, field graphql.CollectedField, obj *model.TicketMention) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TicketMention",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.TicketMention().Ticket(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TicketMention_author(ctx context.Context, field graphql.CollectedField, obj *model.TicketMention) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TicketMention",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.TicketMention().Author(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TicketMention_mentioned(ctx context.Context, field graphql.CollectedField, obj *model.TicketMention) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TicketMention",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.TicketMention().Mentioned(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TicketSubscription_id(ctx context.Context, field graphql.CollectedField, obj *model.TicketSubscription) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TicketSubscription",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TicketSubscription_created(ctx context.Context, field graphql.CollectedField, obj *model.TicketSubscription) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TicketSubscription",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Created, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TicketSubscription_ticket(ctx context.Context, field graphql.CollectedField, obj *model.TicketSubscription) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TicketSubscription",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.TicketSubscription().Ticket(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_id(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_created(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Created, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_updated(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Updated, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_owner(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Tracker().Owner(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_name(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_description(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_visibility(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Visibility, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Visibility)
|
|
fc.Result = res
|
|
return ec.marshalNVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_ticket(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Tracker_ticket_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Tracker().Ticket(rctx, obj, args["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_tickets(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Tracker_tickets_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Tracker().Tickets(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TicketCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TicketCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TicketCursor)
|
|
fc.Result = res
|
|
return ec.marshalNTicketCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_labels(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Tracker_labels_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Tracker().Labels(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.LabelCursor)
|
|
fc.Result = res
|
|
return ec.marshalNLabelCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabelCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_subscription(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Tracker().Subscription(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TrackerSubscription); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TrackerSubscription`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TrackerSubscription)
|
|
fc.Result = res
|
|
return ec.marshalOTrackerSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerSubscription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_acl(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Tracker().ACL(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.ACL)
|
|
fc.Result = res
|
|
return ec.marshalOACL2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_defaultACL(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Tracker().DefaultACL(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.DefaultACL)
|
|
fc.Result = res
|
|
return ec.marshalNDefaultACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐDefaultACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_acls(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Tracker_acls_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Tracker().Acls(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.ACLCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.ACLCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.ACLCursor)
|
|
fc.Result = res
|
|
return ec.marshalNACLCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACLCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Tracker_export(ctx context.Context, field graphql.CollectedField, obj *model.Tracker) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Tracker",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Tracker().Export(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNURL2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerACL_id(ctx context.Context, field graphql.CollectedField, obj *model.TrackerACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerACL_created(ctx context.Context, field graphql.CollectedField, obj *model.TrackerACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Created, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerACL_tracker(ctx context.Context, field graphql.CollectedField, obj *model.TrackerACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.TrackerACL().Tracker(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalNTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerACL_entity(ctx context.Context, field graphql.CollectedField, obj *model.TrackerACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.TrackerACL().Entity(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerACL_browse(ctx context.Context, field graphql.CollectedField, obj *model.TrackerACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Browse, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerACL_submit(ctx context.Context, field graphql.CollectedField, obj *model.TrackerACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Submit, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerACL_comment(ctx context.Context, field graphql.CollectedField, obj *model.TrackerACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Comment, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerACL_edit(ctx context.Context, field graphql.CollectedField, obj *model.TrackerACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Edit, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerACL_triage(ctx context.Context, field graphql.CollectedField, obj *model.TrackerACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerACL",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Triage, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.TrackerCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Results, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalNTracker2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.TrackerCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerCursor",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Cursor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model1.Cursor)
|
|
fc.Result = res
|
|
return ec.marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerSubscription_id(ctx context.Context, field graphql.CollectedField, obj *model.TrackerSubscription) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerSubscription",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerSubscription_created(ctx context.Context, field graphql.CollectedField, obj *model.TrackerSubscription) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerSubscription",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Created, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TrackerSubscription_tracker(ctx context.Context, field graphql.CollectedField, obj *model.TrackerSubscription) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TrackerSubscription",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.TrackerSubscription().Tracker(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Tracker); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Tracker`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Tracker)
|
|
fc.Result = res
|
|
return ec.marshalNTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ID, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_created(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Created, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_updated(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Updated, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_canonicalName(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CanonicalName(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_username(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Username, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_email(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Email, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_url(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.URL, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_location(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Location, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_bio(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Bio, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_trackers(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "User",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_User_trackers_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.User().Trackers(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TRACKERS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.TrackerCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.TrackerCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.TrackerCursor)
|
|
fc.Result = res
|
|
return ec.marshalNTrackerCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _UserMention_eventType(ctx context.Context, field graphql.CollectedField, obj *model.UserMention) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "UserMention",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EventType, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.EventType)
|
|
fc.Result = res
|
|
return ec.marshalNEventType2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _UserMention_ticket(ctx context.Context, field graphql.CollectedField, obj *model.UserMention) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "UserMention",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.UserMention().Ticket(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "TICKETS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(*model.Ticket); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Ticket`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Ticket)
|
|
fc.Result = res
|
|
return ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _UserMention_author(ctx context.Context, field graphql.CollectedField, obj *model.UserMention) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "UserMention",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.UserMention().Author(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _UserMention_mentioned(ctx context.Context, field graphql.CollectedField, obj *model.UserMention) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "UserMention",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
directive0 := func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.UserMention().Mentioned(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx, "RO")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if ec.directives.Access == nil {
|
|
return nil, errors.New("directive access is not implemented")
|
|
}
|
|
return ec.directives.Access(ctx, obj, directive0, scope, kind)
|
|
}
|
|
|
|
tmp, err := directive1(rctx)
|
|
if err != nil {
|
|
return nil, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
if tmp == nil {
|
|
return nil, nil
|
|
}
|
|
if data, ok := tmp.(model.Entity); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/todo.sr.ht/api/graph/model.Entity`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Version_major(ctx context.Context, field graphql.CollectedField, obj *model.Version) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Version",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Major, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Version_minor(ctx context.Context, field graphql.CollectedField, obj *model.Version) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Version",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Minor, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Version_patch(ctx context.Context, field graphql.CollectedField, obj *model.Version) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Version",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Patch, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(int)
|
|
fc.Result = res
|
|
return ec.marshalNInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Version_deprecationDate(ctx context.Context, field graphql.CollectedField, obj *model.Version) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Version",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationDate, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*time.Time)
|
|
fc.Result = res
|
|
return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Locations, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]string)
|
|
fc.Result = res
|
|
return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsRepeatable, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DefaultValue, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Types(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.QueryType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MutationType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.SubscriptionType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Directives(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Directive)
|
|
fc.Result = res
|
|
return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Kind(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field___Type_fields_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Fields(args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Field)
|
|
fc.Result = res
|
|
return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Interfaces(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.PossibleTypes(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EnumValues(args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.EnumValue)
|
|
fc.Result = res
|
|
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.InputFields(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.OfType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
// endregion **************************** field.gotpl *****************************
|
|
|
|
// region **************************** input.gotpl *****************************
|
|
|
|
func (ec *executionContext) unmarshalInputACLInput(ctx context.Context, obj interface{}) (model.ACLInput, error) {
|
|
var it model.ACLInput
|
|
asMap := map[string]interface{}{}
|
|
for k, v := range obj.(map[string]interface{}) {
|
|
asMap[k] = v
|
|
}
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "browse":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("browse"))
|
|
it.Browse, err = ec.unmarshalNBoolean2bool(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "submit":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("submit"))
|
|
it.Submit, err = ec.unmarshalNBoolean2bool(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "comment":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("comment"))
|
|
it.Comment, err = ec.unmarshalNBoolean2bool(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "edit":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("edit"))
|
|
it.Edit, err = ec.unmarshalNBoolean2bool(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "triage":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("triage"))
|
|
it.Triage, err = ec.unmarshalNBoolean2bool(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputImportInput(ctx context.Context, obj interface{}) (model.ImportInput, error) {
|
|
var it model.ImportInput
|
|
asMap := map[string]interface{}{}
|
|
for k, v := range obj.(map[string]interface{}) {
|
|
asMap[k] = v
|
|
}
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "created":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("created"))
|
|
it.Created, err = ec.unmarshalNTime2timeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "externalId":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalId"))
|
|
it.ExternalID, err = ec.unmarshalNString2string(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "externalUrl":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalUrl"))
|
|
it.ExternalURL, err = ec.unmarshalNString2string(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputSubmitCommentInput(ctx context.Context, obj interface{}) (model.SubmitCommentInput, error) {
|
|
var it model.SubmitCommentInput
|
|
asMap := map[string]interface{}{}
|
|
for k, v := range obj.(map[string]interface{}) {
|
|
asMap[k] = v
|
|
}
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "text":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text"))
|
|
it.Text, err = ec.unmarshalNString2string(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "status":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status"))
|
|
it.Status, err = ec.unmarshalOTicketStatus2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketStatus(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "resolution":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resolution"))
|
|
it.Resolution, err = ec.unmarshalOTicketResolution2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketResolution(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "import":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("import"))
|
|
it.Import, err = ec.unmarshalOImportInput2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐImportInput(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputSubmitTicketInput(ctx context.Context, obj interface{}) (model.SubmitTicketInput, error) {
|
|
var it model.SubmitTicketInput
|
|
asMap := map[string]interface{}{}
|
|
for k, v := range obj.(map[string]interface{}) {
|
|
asMap[k] = v
|
|
}
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "subject":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("subject"))
|
|
it.Subject, err = ec.unmarshalNString2string(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "body":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("body"))
|
|
it.Body, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "created":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("created"))
|
|
it.Created, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "externalId":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalId"))
|
|
it.ExternalID, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "externalUrl":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalUrl"))
|
|
it.ExternalURL, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputUpdateStatusInput(ctx context.Context, obj interface{}) (model.UpdateStatusInput, error) {
|
|
var it model.UpdateStatusInput
|
|
asMap := map[string]interface{}{}
|
|
for k, v := range obj.(map[string]interface{}) {
|
|
asMap[k] = v
|
|
}
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "status":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status"))
|
|
it.Status, err = ec.unmarshalNTicketStatus2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketStatus(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "resolution":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resolution"))
|
|
it.Resolution, err = ec.unmarshalOTicketResolution2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketResolution(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "import":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("import"))
|
|
it.Import, err = ec.unmarshalOImportInput2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐImportInput(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
// endregion **************************** input.gotpl *****************************
|
|
|
|
// region ************************** interface.gotpl ***************************
|
|
|
|
func (ec *executionContext) _ACL(ctx context.Context, sel ast.SelectionSet, obj model.ACL) graphql.Marshaler {
|
|
switch obj := (obj).(type) {
|
|
case nil:
|
|
return graphql.Null
|
|
case model.TrackerACL:
|
|
return ec._TrackerACL(ctx, sel, &obj)
|
|
case *model.TrackerACL:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._TrackerACL(ctx, sel, obj)
|
|
case model.DefaultACL:
|
|
return ec._DefaultACL(ctx, sel, &obj)
|
|
case *model.DefaultACL:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._DefaultACL(ctx, sel, obj)
|
|
default:
|
|
panic(fmt.Errorf("unexpected type %T", obj))
|
|
}
|
|
}
|
|
|
|
func (ec *executionContext) _ActivitySubscription(ctx context.Context, sel ast.SelectionSet, obj model.ActivitySubscription) graphql.Marshaler {
|
|
switch obj := (obj).(type) {
|
|
case nil:
|
|
return graphql.Null
|
|
case model.TrackerSubscription:
|
|
return ec._TrackerSubscription(ctx, sel, &obj)
|
|
case *model.TrackerSubscription:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._TrackerSubscription(ctx, sel, obj)
|
|
case model.TicketSubscription:
|
|
return ec._TicketSubscription(ctx, sel, &obj)
|
|
case *model.TicketSubscription:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._TicketSubscription(ctx, sel, obj)
|
|
default:
|
|
panic(fmt.Errorf("unexpected type %T", obj))
|
|
}
|
|
}
|
|
|
|
func (ec *executionContext) _Entity(ctx context.Context, sel ast.SelectionSet, obj model.Entity) graphql.Marshaler {
|
|
switch obj := (obj).(type) {
|
|
case nil:
|
|
return graphql.Null
|
|
case model.User:
|
|
return ec._User(ctx, sel, &obj)
|
|
case *model.User:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._User(ctx, sel, obj)
|
|
case model.EmailAddress:
|
|
return ec._EmailAddress(ctx, sel, &obj)
|
|
case *model.EmailAddress:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._EmailAddress(ctx, sel, obj)
|
|
case model.ExternalUser:
|
|
return ec._ExternalUser(ctx, sel, &obj)
|
|
case *model.ExternalUser:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._ExternalUser(ctx, sel, obj)
|
|
default:
|
|
panic(fmt.Errorf("unexpected type %T", obj))
|
|
}
|
|
}
|
|
|
|
func (ec *executionContext) _EventDetail(ctx context.Context, sel ast.SelectionSet, obj model.EventDetail) graphql.Marshaler {
|
|
switch obj := (obj).(type) {
|
|
case nil:
|
|
return graphql.Null
|
|
case model.Created:
|
|
return ec._Created(ctx, sel, &obj)
|
|
case *model.Created:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Created(ctx, sel, obj)
|
|
case model.Assignment:
|
|
return ec._Assignment(ctx, sel, &obj)
|
|
case *model.Assignment:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Assignment(ctx, sel, obj)
|
|
case model.Comment:
|
|
return ec._Comment(ctx, sel, &obj)
|
|
case *model.Comment:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Comment(ctx, sel, obj)
|
|
case model.LabelUpdate:
|
|
return ec._LabelUpdate(ctx, sel, &obj)
|
|
case *model.LabelUpdate:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._LabelUpdate(ctx, sel, obj)
|
|
case model.StatusChange:
|
|
return ec._StatusChange(ctx, sel, &obj)
|
|
case *model.StatusChange:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._StatusChange(ctx, sel, obj)
|
|
case model.UserMention:
|
|
return ec._UserMention(ctx, sel, &obj)
|
|
case *model.UserMention:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._UserMention(ctx, sel, obj)
|
|
case model.TicketMention:
|
|
return ec._TicketMention(ctx, sel, &obj)
|
|
case *model.TicketMention:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._TicketMention(ctx, sel, obj)
|
|
default:
|
|
panic(fmt.Errorf("unexpected type %T", obj))
|
|
}
|
|
}
|
|
|
|
// endregion ************************** interface.gotpl ***************************
|
|
|
|
// region **************************** object.gotpl ****************************
|
|
|
|
var aCLCursorImplementors = []string{"ACLCursor"}
|
|
|
|
func (ec *executionContext) _ACLCursor(ctx context.Context, sel ast.SelectionSet, obj *model.ACLCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, aCLCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("ACLCursor")
|
|
case "results":
|
|
out.Values[i] = ec._ACLCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._ACLCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var activitySubscriptionCursorImplementors = []string{"ActivitySubscriptionCursor"}
|
|
|
|
func (ec *executionContext) _ActivitySubscriptionCursor(ctx context.Context, sel ast.SelectionSet, obj *model.ActivitySubscriptionCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, activitySubscriptionCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("ActivitySubscriptionCursor")
|
|
case "results":
|
|
out.Values[i] = ec._ActivitySubscriptionCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._ActivitySubscriptionCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var assignmentImplementors = []string{"Assignment", "EventDetail"}
|
|
|
|
func (ec *executionContext) _Assignment(ctx context.Context, sel ast.SelectionSet, obj *model.Assignment) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, assignmentImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Assignment")
|
|
case "eventType":
|
|
out.Values[i] = ec._Assignment_eventType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Assignment_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "assigner":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Assignment_assigner(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "assignee":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Assignment_assignee(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var commentImplementors = []string{"Comment", "EventDetail"}
|
|
|
|
func (ec *executionContext) _Comment(ctx context.Context, sel ast.SelectionSet, obj *model.Comment) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, commentImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Comment")
|
|
case "eventType":
|
|
out.Values[i] = ec._Comment_eventType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Comment_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "author":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Comment_author(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "text":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Comment_text(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "authenticity":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Comment_authenticity(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "supersededBy":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Comment_supersededBy(ctx, field, obj)
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var createdImplementors = []string{"Created", "EventDetail"}
|
|
|
|
func (ec *executionContext) _Created(ctx context.Context, sel ast.SelectionSet, obj *model.Created) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, createdImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Created")
|
|
case "eventType":
|
|
out.Values[i] = ec._Created_eventType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Created_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "author":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Created_author(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var defaultACLImplementors = []string{"DefaultACL", "ACL"}
|
|
|
|
func (ec *executionContext) _DefaultACL(ctx context.Context, sel ast.SelectionSet, obj *model.DefaultACL) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, defaultACLImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("DefaultACL")
|
|
case "browse":
|
|
out.Values[i] = ec._DefaultACL_browse(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "submit":
|
|
out.Values[i] = ec._DefaultACL_submit(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "comment":
|
|
out.Values[i] = ec._DefaultACL_comment(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "edit":
|
|
out.Values[i] = ec._DefaultACL_edit(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "triage":
|
|
out.Values[i] = ec._DefaultACL_triage(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var emailAddressImplementors = []string{"EmailAddress", "Entity"}
|
|
|
|
func (ec *executionContext) _EmailAddress(ctx context.Context, sel ast.SelectionSet, obj *model.EmailAddress) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, emailAddressImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("EmailAddress")
|
|
case "canonicalName":
|
|
out.Values[i] = ec._EmailAddress_canonicalName(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "mailbox":
|
|
out.Values[i] = ec._EmailAddress_mailbox(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "name":
|
|
out.Values[i] = ec._EmailAddress_name(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var eventImplementors = []string{"Event"}
|
|
|
|
func (ec *executionContext) _Event(ctx context.Context, sel ast.SelectionSet, obj *model.Event) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, eventImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Event")
|
|
case "id":
|
|
out.Values[i] = ec._Event_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._Event_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "changes":
|
|
out.Values[i] = ec._Event_changes(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Event_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var eventCursorImplementors = []string{"EventCursor"}
|
|
|
|
func (ec *executionContext) _EventCursor(ctx context.Context, sel ast.SelectionSet, obj *model.EventCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, eventCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("EventCursor")
|
|
case "results":
|
|
out.Values[i] = ec._EventCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._EventCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var externalUserImplementors = []string{"ExternalUser", "Entity"}
|
|
|
|
func (ec *executionContext) _ExternalUser(ctx context.Context, sel ast.SelectionSet, obj *model.ExternalUser) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, externalUserImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("ExternalUser")
|
|
case "canonicalName":
|
|
out.Values[i] = ec._ExternalUser_canonicalName(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "externalId":
|
|
out.Values[i] = ec._ExternalUser_externalId(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "externalUrl":
|
|
out.Values[i] = ec._ExternalUser_externalUrl(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var labelImplementors = []string{"Label"}
|
|
|
|
func (ec *executionContext) _Label(ctx context.Context, sel ast.SelectionSet, obj *model.Label) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, labelImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Label")
|
|
case "id":
|
|
out.Values[i] = ec._Label_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._Label_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "name":
|
|
out.Values[i] = ec._Label_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "tracker":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Label_tracker(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "backgroundColor":
|
|
out.Values[i] = ec._Label_backgroundColor(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "foregroundColor":
|
|
out.Values[i] = ec._Label_foregroundColor(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "tickets":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Label_tickets(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var labelCursorImplementors = []string{"LabelCursor"}
|
|
|
|
func (ec *executionContext) _LabelCursor(ctx context.Context, sel ast.SelectionSet, obj *model.LabelCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, labelCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("LabelCursor")
|
|
case "results":
|
|
out.Values[i] = ec._LabelCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._LabelCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var labelUpdateImplementors = []string{"LabelUpdate", "EventDetail"}
|
|
|
|
func (ec *executionContext) _LabelUpdate(ctx context.Context, sel ast.SelectionSet, obj *model.LabelUpdate) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, labelUpdateImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("LabelUpdate")
|
|
case "eventType":
|
|
out.Values[i] = ec._LabelUpdate_eventType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._LabelUpdate_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "labeler":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._LabelUpdate_labeler(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "label":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._LabelUpdate_label(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var mutationImplementors = []string{"Mutation"}
|
|
|
|
func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
|
|
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
})
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Mutation")
|
|
case "createTracker":
|
|
out.Values[i] = ec._Mutation_createTracker(ctx, field)
|
|
case "updateTracker":
|
|
out.Values[i] = ec._Mutation_updateTracker(ctx, field)
|
|
case "deleteTracker":
|
|
out.Values[i] = ec._Mutation_deleteTracker(ctx, field)
|
|
case "updateUserACL":
|
|
out.Values[i] = ec._Mutation_updateUserACL(ctx, field)
|
|
case "updateTrackerACL":
|
|
out.Values[i] = ec._Mutation_updateTrackerACL(ctx, field)
|
|
case "deleteACL":
|
|
out.Values[i] = ec._Mutation_deleteACL(ctx, field)
|
|
case "trackerSubscribe":
|
|
out.Values[i] = ec._Mutation_trackerSubscribe(ctx, field)
|
|
case "trackerUnsubscribe":
|
|
out.Values[i] = ec._Mutation_trackerUnsubscribe(ctx, field)
|
|
case "ticketSubscribe":
|
|
out.Values[i] = ec._Mutation_ticketSubscribe(ctx, field)
|
|
case "ticketUnsubscribe":
|
|
out.Values[i] = ec._Mutation_ticketUnsubscribe(ctx, field)
|
|
case "createLabel":
|
|
out.Values[i] = ec._Mutation_createLabel(ctx, field)
|
|
case "updateLabel":
|
|
out.Values[i] = ec._Mutation_updateLabel(ctx, field)
|
|
case "deleteLabel":
|
|
out.Values[i] = ec._Mutation_deleteLabel(ctx, field)
|
|
case "submitTicket":
|
|
out.Values[i] = ec._Mutation_submitTicket(ctx, field)
|
|
case "updateTicket":
|
|
out.Values[i] = ec._Mutation_updateTicket(ctx, field)
|
|
case "updateTicketStatus":
|
|
out.Values[i] = ec._Mutation_updateTicketStatus(ctx, field)
|
|
case "submitComment":
|
|
out.Values[i] = ec._Mutation_submitComment(ctx, field)
|
|
case "assignUser":
|
|
out.Values[i] = ec._Mutation_assignUser(ctx, field)
|
|
case "unassignUser":
|
|
out.Values[i] = ec._Mutation_unassignUser(ctx, field)
|
|
case "labelTicket":
|
|
out.Values[i] = ec._Mutation_labelTicket(ctx, field)
|
|
case "unlabelTicket":
|
|
out.Values[i] = ec._Mutation_unlabelTicket(ctx, field)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var queryImplementors = []string{"Query"}
|
|
|
|
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
|
|
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
Object: "Query",
|
|
})
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Query")
|
|
case "version":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_version(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "me":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_me(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "user":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_user(ctx, field)
|
|
return res
|
|
})
|
|
case "trackers":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_trackers(ctx, field)
|
|
return res
|
|
})
|
|
case "tracker":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_tracker(ctx, field)
|
|
return res
|
|
})
|
|
case "trackerByName":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_trackerByName(ctx, field)
|
|
return res
|
|
})
|
|
case "trackerByOwner":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_trackerByOwner(ctx, field)
|
|
return res
|
|
})
|
|
case "events":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_events(ctx, field)
|
|
return res
|
|
})
|
|
case "subscriptions":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_subscriptions(ctx, field)
|
|
return res
|
|
})
|
|
case "__type":
|
|
out.Values[i] = ec._Query___type(ctx, field)
|
|
case "__schema":
|
|
out.Values[i] = ec._Query___schema(ctx, field)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var statusChangeImplementors = []string{"StatusChange", "EventDetail"}
|
|
|
|
func (ec *executionContext) _StatusChange(ctx context.Context, sel ast.SelectionSet, obj *model.StatusChange) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, statusChangeImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("StatusChange")
|
|
case "eventType":
|
|
out.Values[i] = ec._StatusChange_eventType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._StatusChange_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "editor":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._StatusChange_editor(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "oldStatus":
|
|
out.Values[i] = ec._StatusChange_oldStatus(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "newStatus":
|
|
out.Values[i] = ec._StatusChange_newStatus(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "oldResolution":
|
|
out.Values[i] = ec._StatusChange_oldResolution(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "newResolution":
|
|
out.Values[i] = ec._StatusChange_newResolution(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var ticketImplementors = []string{"Ticket"}
|
|
|
|
func (ec *executionContext) _Ticket(ctx context.Context, sel ast.SelectionSet, obj *model.Ticket) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, ticketImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Ticket")
|
|
case "id":
|
|
out.Values[i] = ec._Ticket_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._Ticket_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "updated":
|
|
out.Values[i] = ec._Ticket_updated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "submitter":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Ticket_submitter(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "tracker":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Ticket_tracker(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "ref":
|
|
out.Values[i] = ec._Ticket_ref(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "subject":
|
|
out.Values[i] = ec._Ticket_subject(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "body":
|
|
out.Values[i] = ec._Ticket_body(ctx, field, obj)
|
|
case "status":
|
|
out.Values[i] = ec._Ticket_status(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "resolution":
|
|
out.Values[i] = ec._Ticket_resolution(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "authenticity":
|
|
out.Values[i] = ec._Ticket_authenticity(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "labels":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Ticket_labels(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "assignees":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Ticket_assignees(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "events":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Ticket_events(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "subscription":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Ticket_subscription(ctx, field, obj)
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var ticketCursorImplementors = []string{"TicketCursor"}
|
|
|
|
func (ec *executionContext) _TicketCursor(ctx context.Context, sel ast.SelectionSet, obj *model.TicketCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, ticketCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("TicketCursor")
|
|
case "results":
|
|
out.Values[i] = ec._TicketCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._TicketCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var ticketMentionImplementors = []string{"TicketMention", "EventDetail"}
|
|
|
|
func (ec *executionContext) _TicketMention(ctx context.Context, sel ast.SelectionSet, obj *model.TicketMention) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, ticketMentionImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("TicketMention")
|
|
case "eventType":
|
|
out.Values[i] = ec._TicketMention_eventType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._TicketMention_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "author":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._TicketMention_author(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "mentioned":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._TicketMention_mentioned(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var ticketSubscriptionImplementors = []string{"TicketSubscription", "ActivitySubscription"}
|
|
|
|
func (ec *executionContext) _TicketSubscription(ctx context.Context, sel ast.SelectionSet, obj *model.TicketSubscription) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, ticketSubscriptionImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("TicketSubscription")
|
|
case "id":
|
|
out.Values[i] = ec._TicketSubscription_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._TicketSubscription_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._TicketSubscription_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var trackerImplementors = []string{"Tracker"}
|
|
|
|
func (ec *executionContext) _Tracker(ctx context.Context, sel ast.SelectionSet, obj *model.Tracker) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, trackerImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Tracker")
|
|
case "id":
|
|
out.Values[i] = ec._Tracker_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._Tracker_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "updated":
|
|
out.Values[i] = ec._Tracker_updated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "owner":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Tracker_owner(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "name":
|
|
out.Values[i] = ec._Tracker_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec._Tracker_description(ctx, field, obj)
|
|
case "visibility":
|
|
out.Values[i] = ec._Tracker_visibility(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Tracker_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "tickets":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Tracker_tickets(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "labels":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Tracker_labels(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "subscription":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Tracker_subscription(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "acl":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Tracker_acl(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "defaultACL":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Tracker_defaultACL(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "acls":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Tracker_acls(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "export":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Tracker_export(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var trackerACLImplementors = []string{"TrackerACL", "ACL"}
|
|
|
|
func (ec *executionContext) _TrackerACL(ctx context.Context, sel ast.SelectionSet, obj *model.TrackerACL) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, trackerACLImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("TrackerACL")
|
|
case "id":
|
|
out.Values[i] = ec._TrackerACL_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._TrackerACL_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "tracker":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._TrackerACL_tracker(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "entity":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._TrackerACL_entity(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "browse":
|
|
out.Values[i] = ec._TrackerACL_browse(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "submit":
|
|
out.Values[i] = ec._TrackerACL_submit(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "comment":
|
|
out.Values[i] = ec._TrackerACL_comment(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "edit":
|
|
out.Values[i] = ec._TrackerACL_edit(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "triage":
|
|
out.Values[i] = ec._TrackerACL_triage(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var trackerCursorImplementors = []string{"TrackerCursor"}
|
|
|
|
func (ec *executionContext) _TrackerCursor(ctx context.Context, sel ast.SelectionSet, obj *model.TrackerCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, trackerCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("TrackerCursor")
|
|
case "results":
|
|
out.Values[i] = ec._TrackerCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._TrackerCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var trackerSubscriptionImplementors = []string{"TrackerSubscription", "ActivitySubscription"}
|
|
|
|
func (ec *executionContext) _TrackerSubscription(ctx context.Context, sel ast.SelectionSet, obj *model.TrackerSubscription) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, trackerSubscriptionImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("TrackerSubscription")
|
|
case "id":
|
|
out.Values[i] = ec._TrackerSubscription_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._TrackerSubscription_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "tracker":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._TrackerSubscription_tracker(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var userImplementors = []string{"User", "Entity"}
|
|
|
|
func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *model.User) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("User")
|
|
case "id":
|
|
out.Values[i] = ec._User_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._User_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "updated":
|
|
out.Values[i] = ec._User_updated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "canonicalName":
|
|
out.Values[i] = ec._User_canonicalName(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "username":
|
|
out.Values[i] = ec._User_username(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "email":
|
|
out.Values[i] = ec._User_email(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "url":
|
|
out.Values[i] = ec._User_url(ctx, field, obj)
|
|
case "location":
|
|
out.Values[i] = ec._User_location(ctx, field, obj)
|
|
case "bio":
|
|
out.Values[i] = ec._User_bio(ctx, field, obj)
|
|
case "trackers":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._User_trackers(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var userMentionImplementors = []string{"UserMention", "EventDetail"}
|
|
|
|
func (ec *executionContext) _UserMention(ctx context.Context, sel ast.SelectionSet, obj *model.UserMention) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, userMentionImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("UserMention")
|
|
case "eventType":
|
|
out.Values[i] = ec._UserMention_eventType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ticket":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._UserMention_ticket(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "author":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._UserMention_author(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "mentioned":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._UserMention_mentioned(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var versionImplementors = []string{"Version"}
|
|
|
|
func (ec *executionContext) _Version(ctx context.Context, sel ast.SelectionSet, obj *model.Version) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, versionImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Version")
|
|
case "major":
|
|
out.Values[i] = ec._Version_major(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "minor":
|
|
out.Values[i] = ec._Version_minor(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "patch":
|
|
out.Values[i] = ec._Version_patch(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deprecationDate":
|
|
out.Values[i] = ec._Version_deprecationDate(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __DirectiveImplementors = []string{"__Directive"}
|
|
|
|
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Directive")
|
|
case "name":
|
|
out.Values[i] = ec.___Directive_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___Directive_description(ctx, field, obj)
|
|
case "locations":
|
|
out.Values[i] = ec.___Directive_locations(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "args":
|
|
out.Values[i] = ec.___Directive_args(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "isRepeatable":
|
|
out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __EnumValueImplementors = []string{"__EnumValue"}
|
|
|
|
func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__EnumValue")
|
|
case "name":
|
|
out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
|
|
case "isDeprecated":
|
|
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deprecationReason":
|
|
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __FieldImplementors = []string{"__Field"}
|
|
|
|
func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Field")
|
|
case "name":
|
|
out.Values[i] = ec.___Field_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___Field_description(ctx, field, obj)
|
|
case "args":
|
|
out.Values[i] = ec.___Field_args(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "type":
|
|
out.Values[i] = ec.___Field_type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "isDeprecated":
|
|
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deprecationReason":
|
|
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __InputValueImplementors = []string{"__InputValue"}
|
|
|
|
func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__InputValue")
|
|
case "name":
|
|
out.Values[i] = ec.___InputValue_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
|
|
case "type":
|
|
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "defaultValue":
|
|
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __SchemaImplementors = []string{"__Schema"}
|
|
|
|
func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Schema")
|
|
case "types":
|
|
out.Values[i] = ec.___Schema_types(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "queryType":
|
|
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "mutationType":
|
|
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
|
|
case "subscriptionType":
|
|
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
|
|
case "directives":
|
|
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __TypeImplementors = []string{"__Type"}
|
|
|
|
func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Type")
|
|
case "kind":
|
|
out.Values[i] = ec.___Type_kind(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "name":
|
|
out.Values[i] = ec.___Type_name(ctx, field, obj)
|
|
case "description":
|
|
out.Values[i] = ec.___Type_description(ctx, field, obj)
|
|
case "fields":
|
|
out.Values[i] = ec.___Type_fields(ctx, field, obj)
|
|
case "interfaces":
|
|
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
|
|
case "possibleTypes":
|
|
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
|
|
case "enumValues":
|
|
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
|
|
case "inputFields":
|
|
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
|
|
case "ofType":
|
|
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
// endregion **************************** object.gotpl ****************************
|
|
|
|
// region ***************************** type.gotpl *****************************
|
|
|
|
func (ec *executionContext) marshalNACLCursor2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACLCursor(ctx context.Context, sel ast.SelectionSet, v model.ACLCursor) graphql.Marshaler {
|
|
return ec._ACLCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNACLCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACLCursor(ctx context.Context, sel ast.SelectionSet, v *model.ACLCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._ACLCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNACLInput2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACLInput(ctx context.Context, v interface{}) (model.ACLInput, error) {
|
|
res, err := ec.unmarshalInputACLInput(ctx, v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx context.Context, v interface{}) (model.AccessKind, error) {
|
|
var res model.AccessKind
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessKind(ctx context.Context, sel ast.SelectionSet, v model.AccessKind) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx context.Context, v interface{}) (model.AccessScope, error) {
|
|
var res model.AccessScope
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx context.Context, sel ast.SelectionSet, v model.AccessScope) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalNActivitySubscription2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐActivitySubscription(ctx context.Context, sel ast.SelectionSet, v model.ActivitySubscription) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._ActivitySubscription(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNActivitySubscription2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐActivitySubscriptionᚄ(ctx context.Context, sel ast.SelectionSet, v []model.ActivitySubscription) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNActivitySubscription2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐActivitySubscription(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNAuthenticity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAuthenticity(ctx context.Context, v interface{}) (model.Authenticity, error) {
|
|
var res model.Authenticity
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNAuthenticity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAuthenticity(ctx context.Context, sel ast.SelectionSet, v model.Authenticity) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
res := graphql.MarshalBoolean(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNDefaultACL2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐDefaultACL(ctx context.Context, sel ast.SelectionSet, v model.DefaultACL) graphql.Marshaler {
|
|
return ec._DefaultACL(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNDefaultACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐDefaultACL(ctx context.Context, sel ast.SelectionSet, v *model.DefaultACL) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._DefaultACL(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx context.Context, sel ast.SelectionSet, v model.Entity) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Entity(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEntity2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntityᚄ(ctx context.Context, sel ast.SelectionSet, v []model.Entity) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEvent2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Event) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNEvent2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEvent(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEvent2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEvent(ctx context.Context, sel ast.SelectionSet, v *model.Event) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Event(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEventCursor2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventCursor(ctx context.Context, sel ast.SelectionSet, v model.EventCursor) graphql.Marshaler {
|
|
return ec._EventCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEventCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventCursor(ctx context.Context, sel ast.SelectionSet, v *model.EventCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._EventCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEventDetail2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventDetail(ctx context.Context, sel ast.SelectionSet, v model.EventDetail) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._EventDetail(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEventDetail2ᚕgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventDetailᚄ(ctx context.Context, sel ast.SelectionSet, v []model.EventDetail) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNEventDetail2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventDetail(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNEventType2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventType(ctx context.Context, v interface{}) (model.EventType, error) {
|
|
var res model.EventType
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEventType2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventType(ctx context.Context, sel ast.SelectionSet, v model.EventType) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {
|
|
res, err := graphql.UnmarshalInt(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
|
|
res := graphql.MarshalInt(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNLabel2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabel(ctx context.Context, sel ast.SelectionSet, v model.Label) graphql.Marshaler {
|
|
return ec._Label(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNLabel2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabelᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Label) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNLabel2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabel(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNLabel2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabel(ctx context.Context, sel ast.SelectionSet, v *model.Label) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Label(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNLabelCursor2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabelCursor(ctx context.Context, sel ast.SelectionSet, v model.LabelCursor) graphql.Marshaler {
|
|
return ec._LabelCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNLabelCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabelCursor(ctx context.Context, sel ast.SelectionSet, v *model.LabelCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._LabelCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNSubmitCommentInput2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐSubmitCommentInput(ctx context.Context, v interface{}) (model.SubmitCommentInput, error) {
|
|
res, err := ec.unmarshalInputSubmitCommentInput(ctx, v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNSubmitTicketInput2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐSubmitTicketInput(ctx context.Context, v interface{}) (model.SubmitTicketInput, error) {
|
|
res, err := ec.unmarshalInputSubmitTicketInput(ctx, v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTicket2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx context.Context, sel ast.SelectionSet, v model.Ticket) graphql.Marshaler {
|
|
return ec._Ticket(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTicket2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Ticket) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx context.Context, sel ast.SelectionSet, v *model.Ticket) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Ticket(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTicketCursor2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketCursor(ctx context.Context, sel ast.SelectionSet, v model.TicketCursor) graphql.Marshaler {
|
|
return ec._TicketCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTicketCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketCursor(ctx context.Context, sel ast.SelectionSet, v *model.TicketCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._TicketCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNTicketResolution2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketResolution(ctx context.Context, v interface{}) (model.TicketResolution, error) {
|
|
var res model.TicketResolution
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTicketResolution2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketResolution(ctx context.Context, sel ast.SelectionSet, v model.TicketResolution) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNTicketStatus2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketStatus(ctx context.Context, v interface{}) (model.TicketStatus, error) {
|
|
var res model.TicketStatus
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTicketStatus2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketStatus(ctx context.Context, sel ast.SelectionSet, v model.TicketStatus) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
|
|
res, err := graphql.UnmarshalTime(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
|
|
res := graphql.MarshalTime(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTracker2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx context.Context, sel ast.SelectionSet, v model.Tracker) graphql.Marshaler {
|
|
return ec._Tracker(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTracker2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Tracker) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx context.Context, sel ast.SelectionSet, v *model.Tracker) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Tracker(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTrackerACL2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerACLᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.TrackerACL) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalNTrackerACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerACL(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTrackerACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerACL(ctx context.Context, sel ast.SelectionSet, v *model.TrackerACL) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._TrackerACL(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTrackerCursor2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerCursor(ctx context.Context, sel ast.SelectionSet, v model.TrackerCursor) graphql.Marshaler {
|
|
return ec._TrackerCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTrackerCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerCursor(ctx context.Context, sel ast.SelectionSet, v *model.TrackerCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._TrackerCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNTrackerInput2map(ctx context.Context, v interface{}) (map[string]interface{}, error) {
|
|
return v.(map[string]interface{}), nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNURL2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNURL2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNUpdateLabelInput2map(ctx context.Context, v interface{}) (map[string]interface{}, error) {
|
|
return v.(map[string]interface{}), nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNUpdateStatusInput2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUpdateStatusInput(ctx context.Context, v interface{}) (model.UpdateStatusInput, error) {
|
|
res, err := ec.unmarshalInputUpdateStatusInput(ctx, v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNUpdateTicketInput2map(ctx context.Context, v interface{}) (map[string]interface{}, error) {
|
|
return v.(map[string]interface{}), nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUser2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v model.User) graphql.Marshaler {
|
|
return ec._User(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUser2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._User(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNVersion2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVersion(ctx context.Context, sel ast.SelectionSet, v model.Version) graphql.Marshaler {
|
|
return ec._Version(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNVersion2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVersion(ctx context.Context, sel ast.SelectionSet, v *model.Version) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Version(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, v interface{}) (model.Visibility, error) {
|
|
var res model.Visibility
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNVisibility2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, sel ast.SelectionSet, v model.Visibility) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
|
|
return ec.___Directive(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
|
|
return ec.___EnumValue(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
|
|
return ec.___Field(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
|
|
return ec.___InputValue(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
|
|
return ec.___Type(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalOACL2gitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACL(ctx context.Context, sel ast.SelectionSet, v model.ACL) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._ACL(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOActivitySubscriptionCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐActivitySubscriptionCursor(ctx context.Context, sel ast.SelectionSet, v *model.ActivitySubscriptionCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._ActivitySubscriptionCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
return graphql.MarshalBoolean(v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalBoolean(*v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOComment2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐComment(ctx context.Context, sel ast.SelectionSet, v *model.Comment) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Comment(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx context.Context, v interface{}) (*model1.Cursor, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model1.Cursor)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋcoreᚑgoᚋmodelᚐCursor(ctx context.Context, sel ast.SelectionSet, v *model1.Cursor) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalODefaultACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐDefaultACL(ctx context.Context, sel ast.SelectionSet, v *model.DefaultACL) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._DefaultACL(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOEvent2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEvent(ctx context.Context, sel ast.SelectionSet, v *model.Event) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Event(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOEventCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEventCursor(ctx context.Context, sel ast.SelectionSet, v *model.EventCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._EventCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOImportInput2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐImportInput(ctx context.Context, v interface{}) (*model.ImportInput, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputImportInput(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOLabel2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐLabel(ctx context.Context, sel ast.SelectionSet, v *model.Label) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Label(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
return graphql.MarshalString(v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalString(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalString(*v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTicket2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicket(ctx context.Context, sel ast.SelectionSet, v *model.Ticket) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Ticket(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOTicketResolution2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketResolution(ctx context.Context, v interface{}) (*model.TicketResolution, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model.TicketResolution)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTicketResolution2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketResolution(ctx context.Context, sel ast.SelectionSet, v *model.TicketResolution) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOTicketStatus2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketStatus(ctx context.Context, v interface{}) (*model.TicketStatus, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model.TicketStatus)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTicketStatus2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketStatus(ctx context.Context, sel ast.SelectionSet, v *model.TicketStatus) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTicketSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTicketSubscription(ctx context.Context, sel ast.SelectionSet, v *model.TicketSubscription) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._TicketSubscription(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalTime(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalTime(*v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTracker2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTracker(ctx context.Context, sel ast.SelectionSet, v *model.Tracker) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Tracker(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTrackerACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerACL(ctx context.Context, sel ast.SelectionSet, v *model.TrackerACL) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._TrackerACL(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTrackerCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerCursor(ctx context.Context, sel ast.SelectionSet, v *model.TrackerCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._TrackerCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTrackerSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐTrackerSubscription(ctx context.Context, sel ast.SelectionSet, v *model.TrackerSubscription) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._TrackerSubscription(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOUpload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, v interface{}) (*graphql.Upload, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalUpload(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOUpload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚐUpload(ctx context.Context, sel ast.SelectionSet, v *graphql.Upload) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalUpload(*v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOUser2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._User(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOVisibility2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, v interface{}) (*model.Visibility, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model.Visibility)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOVisibility2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋtodoᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐVisibility(ctx context.Context, sel ast.SelectionSet, v *model.Visibility) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec.___Schema(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
// endregion ***************************** type.gotpl *****************************
|