13699 lines
389 KiB
Go
13699 lines
389 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/lists.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 {
|
|
Email() EmailResolver
|
|
MailingList() MailingListResolver
|
|
MailingListACL() MailingListACLResolver
|
|
MailingListSubscription() MailingListSubscriptionResolver
|
|
Mutation() MutationResolver
|
|
Patchset() PatchsetResolver
|
|
PatchsetTool() PatchsetToolResolver
|
|
Query() QueryResolver
|
|
Thread() ThreadResolver
|
|
User() UserResolver
|
|
}
|
|
|
|
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 {
|
|
ActivitySubscriptionCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
Email struct {
|
|
AddressList func(childComplexity int, want string) int
|
|
Body func(childComplexity int) int
|
|
Date func(childComplexity int) int
|
|
Envelope func(childComplexity int) int
|
|
Header func(childComplexity int, want string) int
|
|
ID func(childComplexity int) int
|
|
InReplyTo func(childComplexity int) int
|
|
List func(childComplexity int) int
|
|
MessageID func(childComplexity int) int
|
|
Parent func(childComplexity int) int
|
|
Patch func(childComplexity int) int
|
|
Patchset func(childComplexity int) int
|
|
Received func(childComplexity int) int
|
|
Sender func(childComplexity int) int
|
|
Subject func(childComplexity int) int
|
|
Thread func(childComplexity int) int
|
|
}
|
|
|
|
EmailCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
GeneralACL struct {
|
|
Browse func(childComplexity int) int
|
|
Moderate func(childComplexity int) int
|
|
Post func(childComplexity int) int
|
|
Reply func(childComplexity int) int
|
|
}
|
|
|
|
Mailbox struct {
|
|
Address func(childComplexity int) int
|
|
CanonicalName func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
}
|
|
|
|
MailingList struct {
|
|
ACL func(childComplexity int, cursor *model1.Cursor) int
|
|
Access func(childComplexity int) int
|
|
Archive func(childComplexity int) int
|
|
Created func(childComplexity int) int
|
|
Description func(childComplexity int) int
|
|
Emails func(childComplexity int, cursor *model1.Cursor) int
|
|
ID func(childComplexity int) int
|
|
Identified func(childComplexity int) int
|
|
Importing func(childComplexity int) int
|
|
Last30days func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
Nonsubscriber func(childComplexity int) int
|
|
Owner func(childComplexity int) int
|
|
Patches func(childComplexity int, cursor *model1.Cursor) int
|
|
PermitMime func(childComplexity int) int
|
|
RejectMime func(childComplexity int) int
|
|
Subscriber func(childComplexity int) int
|
|
Subscription func(childComplexity int) int
|
|
Threads func(childComplexity int, cursor *model1.Cursor) int
|
|
Updated func(childComplexity int) int
|
|
}
|
|
|
|
MailingListACL struct {
|
|
Browse func(childComplexity int) int
|
|
Created func(childComplexity int) int
|
|
Entity func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
List func(childComplexity int) int
|
|
Moderate func(childComplexity int) int
|
|
Post func(childComplexity int) int
|
|
Reply func(childComplexity int) int
|
|
}
|
|
|
|
MailingListACLCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
MailingListCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
MailingListSubscription struct {
|
|
Created func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
List func(childComplexity int) int
|
|
}
|
|
|
|
Mutation struct {
|
|
CreateMailingList func(childComplexity int, name string, description *string) int
|
|
CreateTool func(childComplexity int, patchsetID int, details string, icon model.ToolIcon) int
|
|
DeleteACL func(childComplexity int, id int) int
|
|
DeleteMailingList func(childComplexity int, id int) int
|
|
MailingListSubscribe func(childComplexity int, listID int) int
|
|
MailingListUnsubscribe func(childComplexity int, listID int) int
|
|
UpdateMailingList func(childComplexity int, id int, input map[string]interface{}) int
|
|
UpdateMailingListACL func(childComplexity int, listID int, input model.ACLInput) int
|
|
UpdatePatchset func(childComplexity int, id int, status model.PatchsetStatus) int
|
|
UpdateSenderACL func(childComplexity int, listID int, address string, input model.ACLInput) int
|
|
UpdateTool func(childComplexity int, id int, details *string, icon *model.ToolIcon) int
|
|
UpdateUserACL func(childComplexity int, listID int, userID int, input model.ACLInput) int
|
|
}
|
|
|
|
Patch struct {
|
|
Count func(childComplexity int) int
|
|
Index func(childComplexity int) int
|
|
Prefix func(childComplexity int) int
|
|
Subject func(childComplexity int) int
|
|
Version func(childComplexity int) int
|
|
}
|
|
|
|
Patchset struct {
|
|
CoverLetter func(childComplexity int) int
|
|
Created func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
List func(childComplexity int) int
|
|
Mbox func(childComplexity int) int
|
|
Patches func(childComplexity int, cursor *model1.Cursor) int
|
|
Prefix func(childComplexity int) int
|
|
Status func(childComplexity int) int
|
|
Subject func(childComplexity int) int
|
|
Submitter func(childComplexity int) int
|
|
SupersededBy func(childComplexity int) int
|
|
Thread func(childComplexity int) int
|
|
Tools func(childComplexity int) int
|
|
Updated func(childComplexity int) int
|
|
Version func(childComplexity int) int
|
|
}
|
|
|
|
PatchsetCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results func(childComplexity int) int
|
|
}
|
|
|
|
PatchsetTool struct {
|
|
Created func(childComplexity int) int
|
|
Details func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
Icon func(childComplexity int) int
|
|
Patchset func(childComplexity int) int
|
|
Updated func(childComplexity int) int
|
|
}
|
|
|
|
Query struct {
|
|
Email func(childComplexity int, id int) int
|
|
MailingList func(childComplexity int, id int) int
|
|
MailingListByName func(childComplexity int, name string) int
|
|
MailingListByOwner func(childComplexity int, ownerName string, listName string) int
|
|
MailingLists func(childComplexity int, cursor *model1.Cursor) int
|
|
Me func(childComplexity int) int
|
|
Message func(childComplexity int, messageID string) int
|
|
Patchset func(childComplexity int, id int) int
|
|
Subscriptions func(childComplexity int, cursor *model1.Cursor) int
|
|
User func(childComplexity int, id int) int
|
|
UserByName func(childComplexity int, username string) int
|
|
Version func(childComplexity int) int
|
|
}
|
|
|
|
Thread struct {
|
|
Created func(childComplexity int) int
|
|
Descendants func(childComplexity int, cursor *model1.Cursor) int
|
|
List func(childComplexity int) int
|
|
Mailto func(childComplexity int) int
|
|
Mbox func(childComplexity int) int
|
|
Participants func(childComplexity int) int
|
|
Replies func(childComplexity int) int
|
|
Root func(childComplexity int) int
|
|
Sender func(childComplexity int) int
|
|
Subject func(childComplexity int) int
|
|
Updated func(childComplexity int) int
|
|
}
|
|
|
|
ThreadCursor struct {
|
|
Cursor func(childComplexity int) int
|
|
Results 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
|
|
Emails func(childComplexity int, cursor *model1.Cursor) int
|
|
ID func(childComplexity int) int
|
|
Lists func(childComplexity int, cursor *model1.Cursor) int
|
|
Location func(childComplexity int) int
|
|
Patches func(childComplexity int, cursor *model1.Cursor) int
|
|
Threads func(childComplexity int, cursor *model1.Cursor) int
|
|
URL func(childComplexity int) int
|
|
Updated func(childComplexity int) int
|
|
Username 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 EmailResolver interface {
|
|
Sender(ctx context.Context, obj *model.Email) (model.Entity, error)
|
|
|
|
Date(ctx context.Context, obj *model.Email) (*time.Time, error)
|
|
|
|
Header(ctx context.Context, obj *model.Email, want string) ([]string, error)
|
|
AddressList(ctx context.Context, obj *model.Email, want string) ([]*model.Mailbox, error)
|
|
|
|
Envelope(ctx context.Context, obj *model.Email) (*model.URL, error)
|
|
Thread(ctx context.Context, obj *model.Email) (*model.Thread, error)
|
|
Parent(ctx context.Context, obj *model.Email) (*model.Email, error)
|
|
|
|
Patchset(ctx context.Context, obj *model.Email) (*model.Patchset, error)
|
|
List(ctx context.Context, obj *model.Email) (*model.MailingList, error)
|
|
}
|
|
type MailingListResolver interface {
|
|
Owner(ctx context.Context, obj *model.MailingList) (model.Entity, error)
|
|
|
|
Threads(ctx context.Context, obj *model.MailingList, cursor *model1.Cursor) (*model.ThreadCursor, error)
|
|
Emails(ctx context.Context, obj *model.MailingList, cursor *model1.Cursor) (*model.EmailCursor, error)
|
|
Patches(ctx context.Context, obj *model.MailingList, cursor *model1.Cursor) (*model.PatchsetCursor, error)
|
|
|
|
Access(ctx context.Context, obj *model.MailingList) (model.ACL, error)
|
|
Subscription(ctx context.Context, obj *model.MailingList) (*model.MailingListSubscription, error)
|
|
Archive(ctx context.Context, obj *model.MailingList) (*model.URL, error)
|
|
Last30days(ctx context.Context, obj *model.MailingList) (*model.URL, error)
|
|
ACL(ctx context.Context, obj *model.MailingList, cursor *model1.Cursor) (*model.MailingListACLCursor, error)
|
|
}
|
|
type MailingListACLResolver interface {
|
|
List(ctx context.Context, obj *model.MailingListACL) (*model.MailingList, error)
|
|
Entity(ctx context.Context, obj *model.MailingListACL) (model.Entity, error)
|
|
}
|
|
type MailingListSubscriptionResolver interface {
|
|
List(ctx context.Context, obj *model.MailingListSubscription) (*model.MailingList, error)
|
|
}
|
|
type MutationResolver interface {
|
|
CreateMailingList(ctx context.Context, name string, description *string) (*model.MailingList, error)
|
|
UpdateMailingList(ctx context.Context, id int, input map[string]interface{}) (*model.MailingList, error)
|
|
DeleteMailingList(ctx context.Context, id int) (*model.MailingList, error)
|
|
UpdateUserACL(ctx context.Context, listID int, userID int, input model.ACLInput) (*model.MailingListACL, error)
|
|
UpdateSenderACL(ctx context.Context, listID int, address string, input model.ACLInput) (*model.MailingListACL, error)
|
|
UpdateMailingListACL(ctx context.Context, listID int, input model.ACLInput) (*model.MailingList, error)
|
|
DeleteACL(ctx context.Context, id int) (*model.MailingListACL, error)
|
|
UpdatePatchset(ctx context.Context, id int, status model.PatchsetStatus) (*model.Patchset, error)
|
|
CreateTool(ctx context.Context, patchsetID int, details string, icon model.ToolIcon) (*model.PatchsetTool, error)
|
|
UpdateTool(ctx context.Context, id int, details *string, icon *model.ToolIcon) (*model.PatchsetTool, error)
|
|
MailingListSubscribe(ctx context.Context, listID int) (*model.MailingListSubscription, error)
|
|
MailingListUnsubscribe(ctx context.Context, listID int) (*model.MailingListSubscription, error)
|
|
}
|
|
type PatchsetResolver interface {
|
|
Submitter(ctx context.Context, obj *model.Patchset) (model.Entity, error)
|
|
CoverLetter(ctx context.Context, obj *model.Patchset) (*model.Email, error)
|
|
Thread(ctx context.Context, obj *model.Patchset) (*model.Thread, error)
|
|
SupersededBy(ctx context.Context, obj *model.Patchset) (*model.Patchset, error)
|
|
List(ctx context.Context, obj *model.Patchset) (*model.MailingList, error)
|
|
Patches(ctx context.Context, obj *model.Patchset, cursor *model1.Cursor) (*model.EmailCursor, error)
|
|
Tools(ctx context.Context, obj *model.Patchset) ([]*model.PatchsetTool, error)
|
|
Mbox(ctx context.Context, obj *model.Patchset) (*model.URL, error)
|
|
}
|
|
type PatchsetToolResolver interface {
|
|
Patchset(ctx context.Context, obj *model.PatchsetTool) (*model.Patchset, error)
|
|
}
|
|
type QueryResolver interface {
|
|
Version(ctx context.Context) (*model.Version, error)
|
|
Me(ctx context.Context) (*model.User, error)
|
|
User(ctx context.Context, id int) (*model.User, error)
|
|
UserByName(ctx context.Context, username string) (*model.User, error)
|
|
MailingList(ctx context.Context, id int) (*model.MailingList, error)
|
|
MailingListByName(ctx context.Context, name string) (*model.MailingList, error)
|
|
MailingListByOwner(ctx context.Context, ownerName string, listName string) (*model.MailingList, error)
|
|
Email(ctx context.Context, id int) (*model.Email, error)
|
|
Message(ctx context.Context, messageID string) (*model.Email, error)
|
|
Patchset(ctx context.Context, id int) (*model.Patchset, error)
|
|
MailingLists(ctx context.Context, cursor *model1.Cursor) (*model.MailingListCursor, error)
|
|
Subscriptions(ctx context.Context, cursor *model1.Cursor) (*model.ActivitySubscriptionCursor, error)
|
|
}
|
|
type ThreadResolver interface {
|
|
Sender(ctx context.Context, obj *model.Thread) (model.Entity, error)
|
|
Root(ctx context.Context, obj *model.Thread) (*model.Email, error)
|
|
List(ctx context.Context, obj *model.Thread) (*model.MailingList, error)
|
|
Descendants(ctx context.Context, obj *model.Thread, cursor *model1.Cursor) (*model.EmailCursor, error)
|
|
Mailto(ctx context.Context, obj *model.Thread) (string, error)
|
|
Mbox(ctx context.Context, obj *model.Thread) (*model.URL, error)
|
|
}
|
|
type UserResolver interface {
|
|
Lists(ctx context.Context, obj *model.User, cursor *model1.Cursor) (*model.MailingListCursor, error)
|
|
Emails(ctx context.Context, obj *model.User, cursor *model1.Cursor) (*model.EmailCursor, error)
|
|
Threads(ctx context.Context, obj *model.User, cursor *model1.Cursor) (*model.ThreadCursor, error)
|
|
Patches(ctx context.Context, obj *model.User, cursor *model1.Cursor) (*model.PatchsetCursor, 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 "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 "Email.addressList":
|
|
if e.complexity.Email.AddressList == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Email_addressList_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Email.AddressList(childComplexity, args["want"].(string)), true
|
|
|
|
case "Email.body":
|
|
if e.complexity.Email.Body == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Body(childComplexity), true
|
|
|
|
case "Email.date":
|
|
if e.complexity.Email.Date == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Date(childComplexity), true
|
|
|
|
case "Email.envelope":
|
|
if e.complexity.Email.Envelope == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Envelope(childComplexity), true
|
|
|
|
case "Email.header":
|
|
if e.complexity.Email.Header == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Email_header_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Email.Header(childComplexity, args["want"].(string)), true
|
|
|
|
case "Email.id":
|
|
if e.complexity.Email.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.ID(childComplexity), true
|
|
|
|
case "Email.inReplyTo":
|
|
if e.complexity.Email.InReplyTo == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.InReplyTo(childComplexity), true
|
|
|
|
case "Email.list":
|
|
if e.complexity.Email.List == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.List(childComplexity), true
|
|
|
|
case "Email.messageID":
|
|
if e.complexity.Email.MessageID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.MessageID(childComplexity), true
|
|
|
|
case "Email.parent":
|
|
if e.complexity.Email.Parent == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Parent(childComplexity), true
|
|
|
|
case "Email.patch":
|
|
if e.complexity.Email.Patch == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Patch(childComplexity), true
|
|
|
|
case "Email.patchset":
|
|
if e.complexity.Email.Patchset == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Patchset(childComplexity), true
|
|
|
|
case "Email.received":
|
|
if e.complexity.Email.Received == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Received(childComplexity), true
|
|
|
|
case "Email.sender":
|
|
if e.complexity.Email.Sender == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Sender(childComplexity), true
|
|
|
|
case "Email.subject":
|
|
if e.complexity.Email.Subject == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Subject(childComplexity), true
|
|
|
|
case "Email.thread":
|
|
if e.complexity.Email.Thread == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Email.Thread(childComplexity), true
|
|
|
|
case "EmailCursor.cursor":
|
|
if e.complexity.EmailCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.EmailCursor.Cursor(childComplexity), true
|
|
|
|
case "EmailCursor.results":
|
|
if e.complexity.EmailCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.EmailCursor.Results(childComplexity), true
|
|
|
|
case "GeneralACL.browse":
|
|
if e.complexity.GeneralACL.Browse == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.GeneralACL.Browse(childComplexity), true
|
|
|
|
case "GeneralACL.moderate":
|
|
if e.complexity.GeneralACL.Moderate == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.GeneralACL.Moderate(childComplexity), true
|
|
|
|
case "GeneralACL.post":
|
|
if e.complexity.GeneralACL.Post == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.GeneralACL.Post(childComplexity), true
|
|
|
|
case "GeneralACL.reply":
|
|
if e.complexity.GeneralACL.Reply == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.GeneralACL.Reply(childComplexity), true
|
|
|
|
case "Mailbox.address":
|
|
if e.complexity.Mailbox.Address == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Mailbox.Address(childComplexity), true
|
|
|
|
case "Mailbox.canonicalName":
|
|
if e.complexity.Mailbox.CanonicalName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Mailbox.CanonicalName(childComplexity), true
|
|
|
|
case "Mailbox.name":
|
|
if e.complexity.Mailbox.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Mailbox.Name(childComplexity), true
|
|
|
|
case "MailingList.acl":
|
|
if e.complexity.MailingList.ACL == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_MailingList_acl_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.MailingList.ACL(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "MailingList.access":
|
|
if e.complexity.MailingList.Access == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Access(childComplexity), true
|
|
|
|
case "MailingList.archive":
|
|
if e.complexity.MailingList.Archive == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Archive(childComplexity), true
|
|
|
|
case "MailingList.created":
|
|
if e.complexity.MailingList.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Created(childComplexity), true
|
|
|
|
case "MailingList.description":
|
|
if e.complexity.MailingList.Description == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Description(childComplexity), true
|
|
|
|
case "MailingList.emails":
|
|
if e.complexity.MailingList.Emails == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_MailingList_emails_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.MailingList.Emails(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "MailingList.id":
|
|
if e.complexity.MailingList.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.ID(childComplexity), true
|
|
|
|
case "MailingList.identified":
|
|
if e.complexity.MailingList.Identified == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Identified(childComplexity), true
|
|
|
|
case "MailingList.importing":
|
|
if e.complexity.MailingList.Importing == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Importing(childComplexity), true
|
|
|
|
case "MailingList.last30days":
|
|
if e.complexity.MailingList.Last30days == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Last30days(childComplexity), true
|
|
|
|
case "MailingList.name":
|
|
if e.complexity.MailingList.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Name(childComplexity), true
|
|
|
|
case "MailingList.nonsubscriber":
|
|
if e.complexity.MailingList.Nonsubscriber == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Nonsubscriber(childComplexity), true
|
|
|
|
case "MailingList.owner":
|
|
if e.complexity.MailingList.Owner == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Owner(childComplexity), true
|
|
|
|
case "MailingList.patches":
|
|
if e.complexity.MailingList.Patches == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_MailingList_patches_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.MailingList.Patches(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "MailingList.permitMime":
|
|
if e.complexity.MailingList.PermitMime == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.PermitMime(childComplexity), true
|
|
|
|
case "MailingList.rejectMime":
|
|
if e.complexity.MailingList.RejectMime == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.RejectMime(childComplexity), true
|
|
|
|
case "MailingList.subscriber":
|
|
if e.complexity.MailingList.Subscriber == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Subscriber(childComplexity), true
|
|
|
|
case "MailingList.subscription":
|
|
if e.complexity.MailingList.Subscription == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Subscription(childComplexity), true
|
|
|
|
case "MailingList.threads":
|
|
if e.complexity.MailingList.Threads == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_MailingList_threads_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.MailingList.Threads(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "MailingList.updated":
|
|
if e.complexity.MailingList.Updated == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingList.Updated(childComplexity), true
|
|
|
|
case "MailingListACL.browse":
|
|
if e.complexity.MailingListACL.Browse == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACL.Browse(childComplexity), true
|
|
|
|
case "MailingListACL.created":
|
|
if e.complexity.MailingListACL.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACL.Created(childComplexity), true
|
|
|
|
case "MailingListACL.entity":
|
|
if e.complexity.MailingListACL.Entity == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACL.Entity(childComplexity), true
|
|
|
|
case "MailingListACL.id":
|
|
if e.complexity.MailingListACL.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACL.ID(childComplexity), true
|
|
|
|
case "MailingListACL.list":
|
|
if e.complexity.MailingListACL.List == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACL.List(childComplexity), true
|
|
|
|
case "MailingListACL.moderate":
|
|
if e.complexity.MailingListACL.Moderate == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACL.Moderate(childComplexity), true
|
|
|
|
case "MailingListACL.post":
|
|
if e.complexity.MailingListACL.Post == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACL.Post(childComplexity), true
|
|
|
|
case "MailingListACL.reply":
|
|
if e.complexity.MailingListACL.Reply == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACL.Reply(childComplexity), true
|
|
|
|
case "MailingListACLCursor.cursor":
|
|
if e.complexity.MailingListACLCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACLCursor.Cursor(childComplexity), true
|
|
|
|
case "MailingListACLCursor.results":
|
|
if e.complexity.MailingListACLCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListACLCursor.Results(childComplexity), true
|
|
|
|
case "MailingListCursor.cursor":
|
|
if e.complexity.MailingListCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListCursor.Cursor(childComplexity), true
|
|
|
|
case "MailingListCursor.results":
|
|
if e.complexity.MailingListCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListCursor.Results(childComplexity), true
|
|
|
|
case "MailingListSubscription.created":
|
|
if e.complexity.MailingListSubscription.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListSubscription.Created(childComplexity), true
|
|
|
|
case "MailingListSubscription.id":
|
|
if e.complexity.MailingListSubscription.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListSubscription.ID(childComplexity), true
|
|
|
|
case "MailingListSubscription.list":
|
|
if e.complexity.MailingListSubscription.List == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MailingListSubscription.List(childComplexity), true
|
|
|
|
case "Mutation.createMailingList":
|
|
if e.complexity.Mutation.CreateMailingList == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_createMailingList_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.CreateMailingList(childComplexity, args["name"].(string), args["description"].(*string)), true
|
|
|
|
case "Mutation.createTool":
|
|
if e.complexity.Mutation.CreateTool == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_createTool_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.CreateTool(childComplexity, args["patchsetID"].(int), args["details"].(string), args["icon"].(model.ToolIcon)), 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.deleteMailingList":
|
|
if e.complexity.Mutation.DeleteMailingList == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_deleteMailingList_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.DeleteMailingList(childComplexity, args["id"].(int)), true
|
|
|
|
case "Mutation.mailingListSubscribe":
|
|
if e.complexity.Mutation.MailingListSubscribe == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_mailingListSubscribe_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.MailingListSubscribe(childComplexity, args["listID"].(int)), true
|
|
|
|
case "Mutation.mailingListUnsubscribe":
|
|
if e.complexity.Mutation.MailingListUnsubscribe == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_mailingListUnsubscribe_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.MailingListUnsubscribe(childComplexity, args["listID"].(int)), true
|
|
|
|
case "Mutation.updateMailingList":
|
|
if e.complexity.Mutation.UpdateMailingList == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateMailingList_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateMailingList(childComplexity, args["id"].(int), args["input"].(map[string]interface{})), true
|
|
|
|
case "Mutation.updateMailingListACL":
|
|
if e.complexity.Mutation.UpdateMailingListACL == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateMailingListACL_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateMailingListACL(childComplexity, args["listID"].(int), args["input"].(model.ACLInput)), true
|
|
|
|
case "Mutation.updatePatchset":
|
|
if e.complexity.Mutation.UpdatePatchset == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updatePatchset_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdatePatchset(childComplexity, args["id"].(int), args["status"].(model.PatchsetStatus)), true
|
|
|
|
case "Mutation.updateSenderACL":
|
|
if e.complexity.Mutation.UpdateSenderACL == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateSenderACL_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateSenderACL(childComplexity, args["listID"].(int), args["address"].(string), args["input"].(model.ACLInput)), true
|
|
|
|
case "Mutation.updateTool":
|
|
if e.complexity.Mutation.UpdateTool == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateTool_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateTool(childComplexity, args["id"].(int), args["details"].(*string), args["icon"].(*model.ToolIcon)), 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["listID"].(int), args["userID"].(int), args["input"].(model.ACLInput)), true
|
|
|
|
case "Patch.count":
|
|
if e.complexity.Patch.Count == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patch.Count(childComplexity), true
|
|
|
|
case "Patch.index":
|
|
if e.complexity.Patch.Index == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patch.Index(childComplexity), true
|
|
|
|
case "Patch.prefix":
|
|
if e.complexity.Patch.Prefix == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patch.Prefix(childComplexity), true
|
|
|
|
case "Patch.subject":
|
|
if e.complexity.Patch.Subject == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patch.Subject(childComplexity), true
|
|
|
|
case "Patch.version":
|
|
if e.complexity.Patch.Version == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patch.Version(childComplexity), true
|
|
|
|
case "Patchset.coverLetter":
|
|
if e.complexity.Patchset.CoverLetter == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.CoverLetter(childComplexity), true
|
|
|
|
case "Patchset.created":
|
|
if e.complexity.Patchset.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Created(childComplexity), true
|
|
|
|
case "Patchset.id":
|
|
if e.complexity.Patchset.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.ID(childComplexity), true
|
|
|
|
case "Patchset.list":
|
|
if e.complexity.Patchset.List == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.List(childComplexity), true
|
|
|
|
case "Patchset.mbox":
|
|
if e.complexity.Patchset.Mbox == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Mbox(childComplexity), true
|
|
|
|
case "Patchset.patches":
|
|
if e.complexity.Patchset.Patches == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Patchset_patches_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Patchset.Patches(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Patchset.prefix":
|
|
if e.complexity.Patchset.Prefix == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Prefix(childComplexity), true
|
|
|
|
case "Patchset.status":
|
|
if e.complexity.Patchset.Status == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Status(childComplexity), true
|
|
|
|
case "Patchset.subject":
|
|
if e.complexity.Patchset.Subject == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Subject(childComplexity), true
|
|
|
|
case "Patchset.submitter":
|
|
if e.complexity.Patchset.Submitter == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Submitter(childComplexity), true
|
|
|
|
case "Patchset.supersededBy":
|
|
if e.complexity.Patchset.SupersededBy == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.SupersededBy(childComplexity), true
|
|
|
|
case "Patchset.thread":
|
|
if e.complexity.Patchset.Thread == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Thread(childComplexity), true
|
|
|
|
case "Patchset.tools":
|
|
if e.complexity.Patchset.Tools == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Tools(childComplexity), true
|
|
|
|
case "Patchset.updated":
|
|
if e.complexity.Patchset.Updated == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Updated(childComplexity), true
|
|
|
|
case "Patchset.version":
|
|
if e.complexity.Patchset.Version == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Patchset.Version(childComplexity), true
|
|
|
|
case "PatchsetCursor.cursor":
|
|
if e.complexity.PatchsetCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PatchsetCursor.Cursor(childComplexity), true
|
|
|
|
case "PatchsetCursor.results":
|
|
if e.complexity.PatchsetCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PatchsetCursor.Results(childComplexity), true
|
|
|
|
case "PatchsetTool.created":
|
|
if e.complexity.PatchsetTool.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PatchsetTool.Created(childComplexity), true
|
|
|
|
case "PatchsetTool.details":
|
|
if e.complexity.PatchsetTool.Details == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PatchsetTool.Details(childComplexity), true
|
|
|
|
case "PatchsetTool.id":
|
|
if e.complexity.PatchsetTool.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PatchsetTool.ID(childComplexity), true
|
|
|
|
case "PatchsetTool.icon":
|
|
if e.complexity.PatchsetTool.Icon == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PatchsetTool.Icon(childComplexity), true
|
|
|
|
case "PatchsetTool.patchset":
|
|
if e.complexity.PatchsetTool.Patchset == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PatchsetTool.Patchset(childComplexity), true
|
|
|
|
case "PatchsetTool.updated":
|
|
if e.complexity.PatchsetTool.Updated == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.PatchsetTool.Updated(childComplexity), true
|
|
|
|
case "Query.email":
|
|
if e.complexity.Query.Email == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_email_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Email(childComplexity, args["id"].(int)), true
|
|
|
|
case "Query.mailingList":
|
|
if e.complexity.Query.MailingList == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_mailingList_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.MailingList(childComplexity, args["id"].(int)), true
|
|
|
|
case "Query.mailingListByName":
|
|
if e.complexity.Query.MailingListByName == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_mailingListByName_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.MailingListByName(childComplexity, args["name"].(string)), true
|
|
|
|
case "Query.mailingListByOwner":
|
|
if e.complexity.Query.MailingListByOwner == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_mailingListByOwner_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.MailingListByOwner(childComplexity, args["ownerName"].(string), args["listName"].(string)), true
|
|
|
|
case "Query.mailingLists":
|
|
if e.complexity.Query.MailingLists == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_mailingLists_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.MailingLists(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.message":
|
|
if e.complexity.Query.Message == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_message_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Message(childComplexity, args["messageID"].(string)), true
|
|
|
|
case "Query.patchset":
|
|
if e.complexity.Query.Patchset == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_patchset_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Patchset(childComplexity, args["id"].(int)), 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.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["id"].(int)), true
|
|
|
|
case "Query.userByName":
|
|
if e.complexity.Query.UserByName == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_userByName_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.UserByName(childComplexity, args["username"].(string)), true
|
|
|
|
case "Query.version":
|
|
if e.complexity.Query.Version == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Query.Version(childComplexity), true
|
|
|
|
case "Thread.created":
|
|
if e.complexity.Thread.Created == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.Created(childComplexity), true
|
|
|
|
case "Thread.descendants":
|
|
if e.complexity.Thread.Descendants == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Thread_descendants_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Thread.Descendants(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "Thread.list":
|
|
if e.complexity.Thread.List == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.List(childComplexity), true
|
|
|
|
case "Thread.mailto":
|
|
if e.complexity.Thread.Mailto == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.Mailto(childComplexity), true
|
|
|
|
case "Thread.mbox":
|
|
if e.complexity.Thread.Mbox == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.Mbox(childComplexity), true
|
|
|
|
case "Thread.participants":
|
|
if e.complexity.Thread.Participants == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.Participants(childComplexity), true
|
|
|
|
case "Thread.replies":
|
|
if e.complexity.Thread.Replies == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.Replies(childComplexity), true
|
|
|
|
case "Thread.root":
|
|
if e.complexity.Thread.Root == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.Root(childComplexity), true
|
|
|
|
case "Thread.sender":
|
|
if e.complexity.Thread.Sender == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.Sender(childComplexity), true
|
|
|
|
case "Thread.subject":
|
|
if e.complexity.Thread.Subject == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.Subject(childComplexity), true
|
|
|
|
case "Thread.updated":
|
|
if e.complexity.Thread.Updated == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Thread.Updated(childComplexity), true
|
|
|
|
case "ThreadCursor.cursor":
|
|
if e.complexity.ThreadCursor.Cursor == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ThreadCursor.Cursor(childComplexity), true
|
|
|
|
case "ThreadCursor.results":
|
|
if e.complexity.ThreadCursor.Results == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.ThreadCursor.Results(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.emails":
|
|
if e.complexity.User.Emails == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_User_emails_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.User.Emails(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "User.id":
|
|
if e.complexity.User.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.ID(childComplexity), true
|
|
|
|
case "User.lists":
|
|
if e.complexity.User.Lists == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_User_lists_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.User.Lists(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "User.location":
|
|
if e.complexity.User.Location == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.User.Location(childComplexity), true
|
|
|
|
case "User.patches":
|
|
if e.complexity.User.Patches == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_User_patches_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.User.Patches(childComplexity, args["cursor"].(*model1.Cursor)), true
|
|
|
|
case "User.threads":
|
|
if e.complexity.User.Threads == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_User_threads_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.User.Threads(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 "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.
|
|
|
|
"String of the format %Y-%m-%dT%H:%M:%SZ"
|
|
scalar Time
|
|
"Opaque string"
|
|
scalar Cursor
|
|
"""
|
|
URL from which some secondary data may be retrieved. You must provide the
|
|
same Authentication header to this address as you did to the GraphQL resolver
|
|
which provided it. The URL is not guaranteed to be consistent for an extended
|
|
length of time; applications should submit a new GraphQL query each time they
|
|
wish to access the data at the provided URL.
|
|
"""
|
|
scalar URL
|
|
|
|
"Used to provide a human-friendly description of an access scope"
|
|
directive @scopehelp(details: String!) on ENUM_VALUE
|
|
|
|
enum AccessScope {
|
|
ACLS @scopehelp(details: "access control lists")
|
|
EMAILS @scopehelp(details: "emails")
|
|
LISTS @scopehelp(details: "mailing lists")
|
|
PATCHES @scopehelp(details: "patches")
|
|
PROFILE @scopehelp(details: "profile information")
|
|
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!
|
|
}
|
|
|
|
"A registered user"
|
|
type User implements Entity {
|
|
id: Int!
|
|
created: Time!
|
|
updated: Time!
|
|
canonicalName: String!
|
|
username: String!
|
|
email: String!
|
|
url: String
|
|
location: String
|
|
bio: String
|
|
|
|
lists(cursor: Cursor): MailingListCursor @access(scope: LISTS, kind: RO)
|
|
emails(cursor: Cursor): EmailCursor @access(scope: EMAILS, kind: RO)
|
|
threads(cursor: Cursor): ThreadCursor @access(scope: EMAILS, kind: RO)
|
|
patches(cursor: Cursor): PatchsetCursor @access(scope: PATCHES, kind: RO)
|
|
}
|
|
|
|
"A mailbox not associated with a registered user"
|
|
type Mailbox implements Entity {
|
|
canonicalName: String!
|
|
name: String!
|
|
address: String!
|
|
}
|
|
|
|
type MailingList {
|
|
id: Int!
|
|
created: Time!
|
|
updated: Time!
|
|
name: String!
|
|
owner: Entity! @access(scope: PROFILE, kind: RO)
|
|
|
|
# Markdown
|
|
description: String
|
|
|
|
"""
|
|
List of globs for permitted or rejected mimetypes on this list
|
|
e.g. text/*
|
|
"""
|
|
permitMime: [String!]!
|
|
rejectMime: [String!]!
|
|
|
|
"List of threads on this list in order of most recently bumped"
|
|
threads(cursor: Cursor): ThreadCursor! @access(scope: EMAILS, kind: RO)
|
|
"List of emails received on this list in reverse chronological order"
|
|
emails(cursor: Cursor): EmailCursor! @access(scope: EMAILS, kind: RO)
|
|
"List of patches received on this list in order of most recently bumped"
|
|
patches(cursor: Cursor): PatchsetCursor! @access(scope: PATCHES, kind: RO)
|
|
|
|
"True if an import operation is underway for this list"
|
|
importing: Boolean!
|
|
|
|
"The access that applies to this user for this list"
|
|
access: ACL! @access(scope: ACLS, kind: RO)
|
|
|
|
"The user's subscription for this list, if any"
|
|
subscription: MailingListSubscription @access(scope: SUBSCRIPTIONS, kind: RO)
|
|
|
|
"URLs to application/mbox archives for this mailing list"
|
|
archive: URL!
|
|
last30days: URL!
|
|
|
|
#
|
|
# The following resolvers are only available to the list owner:
|
|
|
|
"Access control list entries for this mailing list"
|
|
acl(cursor: Cursor): MailingListACLCursor! @access(scope: ACLS, kind: RO)
|
|
"Permissions which apply to any non-subscriber"
|
|
nonsubscriber: GeneralACL!
|
|
"Permissions which apply to any subscriber"
|
|
subscriber: GeneralACL!
|
|
"Permissions which apply to any authenticated account holder"
|
|
identified: GeneralACL!
|
|
}
|
|
|
|
interface ACL {
|
|
"Permission to browse or subscribe to emails"
|
|
browse: Boolean!
|
|
"Permission to reply to existing threads"
|
|
reply: Boolean!
|
|
"Permission to start new threads"
|
|
post: Boolean!
|
|
"Permission to moderate the list"
|
|
moderate: Boolean!
|
|
}
|
|
|
|
"""
|
|
These ACLs are configured for specific entities, and may be used to expand or
|
|
constrain the rights of a participant.
|
|
"""
|
|
type MailingListACL implements ACL {
|
|
id: Int!
|
|
created: Time!
|
|
list: MailingList! @access(scope: LISTS, kind: RO)
|
|
entity: Entity! @access(scope: PROFILE, kind: RO)
|
|
|
|
browse: Boolean!
|
|
reply: Boolean!
|
|
post: Boolean!
|
|
moderate: Boolean!
|
|
}
|
|
|
|
"""
|
|
An ACL entry that applies "generally", for example the rights which apply to
|
|
all subscribers to a list.
|
|
"""
|
|
type GeneralACL implements ACL {
|
|
browse: Boolean!
|
|
reply: Boolean!
|
|
post: Boolean!
|
|
moderate: Boolean!
|
|
}
|
|
|
|
type Thread {
|
|
created: Time!
|
|
updated: Time!
|
|
subject: String!
|
|
replies: Int!
|
|
participants: Int!
|
|
sender: Entity!
|
|
|
|
root: Email!
|
|
|
|
list: MailingList! @access(scope: LISTS, kind: RO)
|
|
|
|
"Replies to this thread, in chronological order"
|
|
descendants(cursor: Cursor): EmailCursor!
|
|
|
|
"A mailto: URI for replying to the latest message in this thread"
|
|
mailto: String!
|
|
|
|
"URL to an application/mbox archive of this thread"
|
|
mbox: URL!
|
|
}
|
|
|
|
type Email {
|
|
id: Int!
|
|
|
|
"""
|
|
The entity which sent this email. Will be a User if it can be associated
|
|
with an account, or a Mailbox otherwise.
|
|
"""
|
|
sender: Entity!
|
|
"Time we received this email (non-forgable)."
|
|
received: Time!
|
|
"Time given by Date header (forgable)."
|
|
date: Time
|
|
"The Subject header."
|
|
subject: String!
|
|
"The Message-ID header, without angle brackets."
|
|
messageID: String!
|
|
"The In-Reply-To header, if present, without angle brackets."
|
|
inReplyTo: String
|
|
|
|
"""
|
|
Provides the value (or values) of a specific header from this email. Note
|
|
that the returned value is coerced to UTF-8 and may be lossy under certain
|
|
circumstances.
|
|
"""
|
|
header(want: String!): [String!]!
|
|
"Retrieves the value of an address list header, such as To or Cc."
|
|
addressList(want: String!): [Mailbox!]!
|
|
"The decoded text/plain message part of the email, i.e. email body."
|
|
body: String!
|
|
"A URL from which the full raw message envelope may be downloaded."
|
|
envelope: URL!
|
|
|
|
thread: Thread!
|
|
parent: Email
|
|
patch: Patch
|
|
|
|
patchset: Patchset @access(scope: PATCHES, kind: RO)
|
|
list: MailingList! @access(scope: LISTS, kind: RO)
|
|
}
|
|
|
|
"""
|
|
Information parsed from the subject line of a patch, such that the following:
|
|
|
|
[PATCH myproject v2 3/4] Add foo to bar
|
|
|
|
Will produce:
|
|
|
|
index: 3
|
|
count: 4
|
|
version: 2
|
|
prefix: "myproject"
|
|
subject: "Add foo to bar"
|
|
"""
|
|
type Patch {
|
|
index: Int
|
|
count: Int
|
|
version: Int
|
|
prefix: String
|
|
subject: String
|
|
}
|
|
|
|
enum PatchsetStatus {
|
|
UNKNOWN
|
|
PROPOSED
|
|
NEEDS_REVISION
|
|
SUPERSEDED
|
|
APPROVED
|
|
REJECTED
|
|
APPLIED
|
|
}
|
|
|
|
type Patchset {
|
|
id: Int!
|
|
created: Time!
|
|
updated: Time!
|
|
subject: String!
|
|
version: Int!
|
|
prefix: String
|
|
status: PatchsetStatus!
|
|
submitter: Entity!
|
|
|
|
coverLetter: Email @access(scope: EMAILS, kind: RO)
|
|
thread: Thread! @access(scope: EMAILS, kind: RO)
|
|
supersededBy: Patchset
|
|
list: MailingList! @access(scope: LISTS, kind: RO)
|
|
patches(cursor: Cursor): EmailCursor! @access(scope: EMAILS, kind: RO)
|
|
tools: [PatchsetTool!]!
|
|
|
|
"URL to an application/mbox archive of only the patches in this thread"
|
|
mbox: URL!
|
|
}
|
|
|
|
enum ToolIcon {
|
|
PENDING
|
|
WAITING
|
|
SUCCESS
|
|
FAILED
|
|
CANCELLED
|
|
}
|
|
|
|
"""
|
|
Used to add some kind of indicator for a third-party process associated with
|
|
a patchset, such as a CI service validating the change.
|
|
"""
|
|
type PatchsetTool {
|
|
id: Int!
|
|
created: Time!
|
|
updated: Time!
|
|
icon: ToolIcon!
|
|
details: String!
|
|
patchset: Patchset!
|
|
}
|
|
|
|
interface ActivitySubscription {
|
|
id: Int!
|
|
created: Time!
|
|
}
|
|
|
|
type MailingListSubscription implements ActivitySubscription {
|
|
id: Int!
|
|
created: Time!
|
|
list: MailingList! @access(scope: LISTS, kind: RO)
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating ACL 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 MailingListACLCursor {
|
|
results: [MailingListACL!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating mailing lists
|
|
|
|
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 MailingListCursor {
|
|
results: [MailingList!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating threads
|
|
|
|
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 ThreadCursor {
|
|
results: [Thread!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating emails
|
|
|
|
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 EmailCursor {
|
|
results: [Email!]!
|
|
cursor: Cursor
|
|
}
|
|
|
|
"""
|
|
A cursor for enumerating patchsets
|
|
|
|
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 PatchsetCursor {
|
|
results: [Patchset!]!
|
|
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)
|
|
|
|
"Looks up a specific user"
|
|
user(id: Int!): User @access(scope: PROFILE, kind: RO)
|
|
userByName(username: String!): User @access(scope: PROFILE, kind: RO)
|
|
|
|
"Looks up a specific mailing list"
|
|
mailingList(id: Int!): MailingList @access(scope: LISTS, kind: RO)
|
|
mailingListByName(name: String!): MailingList @access(scope: LISTS, kind: RO)
|
|
mailingListByOwner(ownerName: String!, listName: String!): MailingList @access(scope: LISTS, kind: RO)
|
|
|
|
"Looks up a specific email by its ID"
|
|
email(id: Int!): Email @access(scope: EMAILS, kind: RO)
|
|
"""
|
|
Looks up a specific email by its Message-ID header, including the angle
|
|
brackets ('<' and '>').
|
|
"""
|
|
message(messageID: String!): Email @access(scope: EMAILS, kind: RO)
|
|
"Looks up a patchset by ID"
|
|
patchset(id: Int!): Patchset @access(scope: EMAILS, kind: RO)
|
|
|
|
"List of mailing lists that the authenticated user has ownership of"
|
|
mailingLists(cursor: Cursor): MailingListCursor! @access(scope: LISTS, 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 mailing list
|
|
input MailingListInput {
|
|
description: String
|
|
|
|
"""
|
|
List of globs for permitted or rejected mimetypes on this list
|
|
e.g. text/*
|
|
"""
|
|
permitMime: [String!]
|
|
rejectMime: [String!]
|
|
}
|
|
|
|
# All fields are required
|
|
input ACLInput {
|
|
browse: Boolean!
|
|
reply: Boolean!
|
|
post: Boolean!
|
|
moderate: Boolean!
|
|
}
|
|
|
|
type Mutation {
|
|
"Creates a new mailing list"
|
|
createMailingList(
|
|
name: String!,
|
|
description: String): MailingList! @access(scope: LISTS, kind: RW)
|
|
|
|
"Updates a mailing list."
|
|
updateMailingList(
|
|
id: Int!,
|
|
input: MailingListInput!): MailingList @access(scope: LISTS, kind: RW)
|
|
|
|
"Deletes a mailing list"
|
|
deleteMailingList(id: Int!): MailingList @access(scope: LISTS, kind: RW)
|
|
|
|
"Adds or updates the ACL for a user on a mailing list"
|
|
updateUserACL(
|
|
listID: Int!,
|
|
userID: Int!,
|
|
input: ACLInput!): MailingListACL @access(scope: ACLS, kind: RW)
|
|
|
|
"Adds or updates the ACL for an email address on a mailing list"
|
|
updateSenderACL(
|
|
listID: Int!,
|
|
address: String!,
|
|
input: ACLInput!): MailingListACL @access(scope: ACLS, kind: RW)
|
|
|
|
"""
|
|
Updates the default ACL for a mailing list, which applies to users and
|
|
senders for whom a more specific ACL does not exist.
|
|
"""
|
|
updateMailingListACL(
|
|
listID: Int!,
|
|
input: ACLInput!): MailingList @access(scope: ACLS, kind: RW)
|
|
|
|
"""
|
|
Removes a mailing list ACL. Following this, the default mailing list ACL will
|
|
apply to this user.
|
|
"""
|
|
deleteACL(id: Int!): MailingListACL @access(scope: ACLS, kind: RW)
|
|
|
|
"Updates the status of a patchset"
|
|
updatePatchset(id: Int!, status: PatchsetStatus!): Patchset @access(scope: PATCHES, kind: RW)
|
|
|
|
"Create a new patchset tool"
|
|
createTool(patchsetID: Int!, details: String!, icon: ToolIcon!): PatchsetTool @access(scope: PATCHES, kind: RW)
|
|
|
|
"Updates the status of a patchset tool by its ID"
|
|
updateTool(id: Int!, details: String, icon: ToolIcon): PatchsetTool @access(scope: PATCHES, kind: RW)
|
|
|
|
"Creates a mailing list subscription"
|
|
mailingListSubscribe(listID: Int!): MailingListSubscription @access(scope: SUBSCRIPTIONS, kind: RW)
|
|
|
|
"Deletes a mailing list subscription"
|
|
mailingListUnsubscribe(listID: Int!): MailingListSubscription @access(scope: SUBSCRIPTIONS, 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ᚋlistsᚗ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ᚋlistsᚗ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_Email_addressList_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["want"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("want"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["want"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Email_header_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["want"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("want"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["want"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_MailingList_acl_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_MailingList_emails_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_MailingList_patches_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_MailingList_threads_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_createMailingList_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
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_createTool_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["patchsetID"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("patchsetID"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["patchsetID"] = arg0
|
|
var arg1 string
|
|
if tmp, ok := rawArgs["details"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("details"))
|
|
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["details"] = arg1
|
|
var arg2 model.ToolIcon
|
|
if tmp, ok := rawArgs["icon"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("icon"))
|
|
arg2, err = ec.unmarshalNToolIcon2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐToolIcon(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["icon"] = arg2
|
|
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_deleteMailingList_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_mailingListSubscribe_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["listID"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("listID"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["listID"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_mailingListUnsubscribe_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["listID"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("listID"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["listID"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateMailingListACL_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["listID"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("listID"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["listID"] = 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ᚋlistsᚗ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_updateMailingList_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.unmarshalNMailingListInput2map(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updatePatchset_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 model.PatchsetStatus
|
|
if tmp, ok := rawArgs["status"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status"))
|
|
arg1, err = ec.unmarshalNPatchsetStatus2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetStatus(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["status"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateSenderACL_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["listID"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("listID"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["listID"] = arg0
|
|
var arg1 string
|
|
if tmp, ok := rawArgs["address"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("address"))
|
|
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["address"] = 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ᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACLInput(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateTool_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 *string
|
|
if tmp, ok := rawArgs["details"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("details"))
|
|
arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["details"] = arg1
|
|
var arg2 *model.ToolIcon
|
|
if tmp, ok := rawArgs["icon"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("icon"))
|
|
arg2, err = ec.unmarshalOToolIcon2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐToolIcon(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["icon"] = arg2
|
|
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["listID"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("listID"))
|
|
arg0, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["listID"] = 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ᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACLInput(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["input"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Patchset_patches_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___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_email_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_mailingListByName_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_mailingListByOwner_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["ownerName"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ownerName"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["ownerName"] = arg0
|
|
var arg1 string
|
|
if tmp, ok := rawArgs["listName"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("listName"))
|
|
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["listName"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_mailingList_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_mailingLists_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_message_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["messageID"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("messageID"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["messageID"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_patchset_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_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_userByName_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_Query_user_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_Thread_descendants_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_emails_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_lists_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_patches_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_threads_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) _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ᚋlistsᚗ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) _Email_id(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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) _Email_sender(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.Email().Sender(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.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Email_received(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.Received, 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) _Email_date(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.Email().Date(rctx, obj)
|
|
})
|
|
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) _Email_subject(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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) _Email_messageID(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.MessageID, 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) _Email_inReplyTo(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.InReplyTo, 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) _Email_header(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Email_header_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.Email().Header(rctx, obj, args["want"].(string))
|
|
})
|
|
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.marshalNString2ᚕstringᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Email_addressList(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Email_addressList_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.Email().AddressList(rctx, obj, args["want"].(string))
|
|
})
|
|
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.Mailbox)
|
|
fc.Result = res
|
|
return ec.marshalNMailbox2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailboxᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Email_body(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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 {
|
|
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) _Email_envelope(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.Email().Envelope(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.URL)
|
|
fc.Result = res
|
|
return ec.marshalNURL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐURL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Email_thread(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.Email().Thread(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.Thread)
|
|
fc.Result = res
|
|
return ec.marshalNThread2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThread(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Email_parent(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.Email().Parent(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Email)
|
|
fc.Result = res
|
|
return ec.marshalOEmail2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmail(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Email_patch(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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 {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(model.Patch)
|
|
fc.Result = res
|
|
return ec.marshalOPatch2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatch(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Email_patchset(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.Email().Patchset(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PATCHES")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.Patchset); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.Patchset`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Patchset)
|
|
fc.Result = res
|
|
return ec.marshalOPatchset2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchset(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Email_list(ctx context.Context, field graphql.CollectedField, obj *model.Email) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Email",
|
|
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.Email().List(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, 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.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalNMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _EmailCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.EmailCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "EmailCursor",
|
|
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.Email)
|
|
fc.Result = res
|
|
return ec.marshalNEmail2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmailᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _EmailCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.EmailCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "EmailCursor",
|
|
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) _GeneralACL_browse(ctx context.Context, field graphql.CollectedField, obj *model.GeneralACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "GeneralACL",
|
|
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) _GeneralACL_reply(ctx context.Context, field graphql.CollectedField, obj *model.GeneralACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "GeneralACL",
|
|
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.Reply, 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) _GeneralACL_post(ctx context.Context, field graphql.CollectedField, obj *model.GeneralACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "GeneralACL",
|
|
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.Post, 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) _GeneralACL_moderate(ctx context.Context, field graphql.CollectedField, obj *model.GeneralACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "GeneralACL",
|
|
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.Moderate, 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) _Mailbox_canonicalName(ctx context.Context, field graphql.CollectedField, obj *model.Mailbox) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mailbox",
|
|
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) _Mailbox_name(ctx context.Context, field graphql.CollectedField, obj *model.Mailbox) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mailbox",
|
|
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) _Mailbox_address(ctx context.Context, field graphql.CollectedField, obj *model.Mailbox) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mailbox",
|
|
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.Address, 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) _MailingList_id(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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) _MailingList_created(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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) _MailingList_updated(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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) _MailingList_name(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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) _MailingList_owner(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.MailingList().Owner(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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/lists.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ᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_description(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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) _MailingList_permitMime(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.PermitMime(), 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.marshalNString2ᚕstringᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_rejectMime(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.RejectMime(), 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.marshalNString2ᚕstringᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_threads(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_MailingList_threads_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.MailingList().Threads(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.ThreadCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.ThreadCursor`, 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.ThreadCursor)
|
|
fc.Result = res
|
|
return ec.marshalNThreadCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThreadCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_emails(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_MailingList_emails_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.MailingList().Emails(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.EmailCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.EmailCursor`, 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.EmailCursor)
|
|
fc.Result = res
|
|
return ec.marshalNEmailCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmailCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_patches(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_MailingList_patches_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.MailingList().Patches(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PATCHES")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.PatchsetCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.PatchsetCursor`, 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.PatchsetCursor)
|
|
fc.Result = res
|
|
return ec.marshalNPatchsetCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_importing(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.Importing, 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) _MailingList_access(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.MailingList().Access(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.ACL); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.ACL`, 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.ACL)
|
|
fc.Result = res
|
|
return ec.marshalNACL2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_subscription(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.MailingList().Subscription(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingListSubscription); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingListSubscription`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingListSubscription)
|
|
fc.Result = res
|
|
return ec.marshalOMailingListSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListSubscription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_archive(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.MailingList().Archive(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.URL)
|
|
fc.Result = res
|
|
return ec.marshalNURL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐURL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_last30days(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.MailingList().Last30days(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.URL)
|
|
fc.Result = res
|
|
return ec.marshalNURL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐURL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_acl(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_MailingList_acl_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.MailingList().ACL(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingListACLCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingListACLCursor`, 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.MailingListACLCursor)
|
|
fc.Result = res
|
|
return ec.marshalNMailingListACLCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACLCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_nonsubscriber(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.Nonsubscriber(), 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.GeneralACL)
|
|
fc.Result = res
|
|
return ec.marshalNGeneralACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐGeneralACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_subscriber(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.Subscriber(), 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.GeneralACL)
|
|
fc.Result = res
|
|
return ec.marshalNGeneralACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐGeneralACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingList_identified(ctx context.Context, field graphql.CollectedField, obj *model.MailingList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingList",
|
|
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.Identified(), 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.GeneralACL)
|
|
fc.Result = res
|
|
return ec.marshalNGeneralACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐGeneralACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingListACL_id(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACL",
|
|
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) _MailingListACL_created(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACL",
|
|
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) _MailingListACL_list(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACL",
|
|
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.MailingListACL().List(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, 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.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalNMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingListACL_entity(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACL",
|
|
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.MailingListACL().Entity(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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/lists.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ᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingListACL_browse(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACL",
|
|
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.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) _MailingListACL_reply(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACL",
|
|
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.Reply(), 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) _MailingListACL_post(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACL",
|
|
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.Post(), 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) _MailingListACL_moderate(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACL) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACL",
|
|
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.Moderate(), 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) _MailingListACLCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACLCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACLCursor",
|
|
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.MailingListACL)
|
|
fc.Result = res
|
|
return ec.marshalNMailingListACL2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACLᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingListACLCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.MailingListACLCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListACLCursor",
|
|
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) _MailingListCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.MailingListCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListCursor",
|
|
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.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalNMailingList2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MailingListCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.MailingListCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListCursor",
|
|
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) _MailingListSubscription_id(ctx context.Context, field graphql.CollectedField, obj *model.MailingListSubscription) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListSubscription",
|
|
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) _MailingListSubscription_created(ctx context.Context, field graphql.CollectedField, obj *model.MailingListSubscription) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListSubscription",
|
|
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) _MailingListSubscription_list(ctx context.Context, field graphql.CollectedField, obj *model.MailingListSubscription) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MailingListSubscription",
|
|
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.MailingListSubscription().List(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, 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.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalNMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_createMailingList(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_createMailingList_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().CreateMailingList(rctx, args["name"].(string), args["description"].(*string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, 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.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalNMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateMailingList(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_updateMailingList_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().UpdateMailingList(rctx, args["id"].(int), args["input"].(map[string]interface{}))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalOMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_deleteMailingList(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_deleteMailingList_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().DeleteMailingList(rctx, args["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalOMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(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["listID"].(int), args["userID"].(int), args["input"].(model.ACLInput))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingListACL); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingListACL`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingListACL)
|
|
fc.Result = res
|
|
return ec.marshalOMailingListACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateSenderACL(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_updateSenderACL_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().UpdateSenderACL(rctx, args["listID"].(int), args["address"].(string), args["input"].(model.ACLInput))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingListACL); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingListACL`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingListACL)
|
|
fc.Result = res
|
|
return ec.marshalOMailingListACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateMailingListACL(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_updateMailingListACL_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().UpdateMailingListACL(rctx, args["listID"].(int), args["input"].(model.ACLInput))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalOMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(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ᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "ACLS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingListACL); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingListACL`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingListACL)
|
|
fc.Result = res
|
|
return ec.marshalOMailingListACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updatePatchset(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_updatePatchset_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().UpdatePatchset(rctx, args["id"].(int), args["status"].(model.PatchsetStatus))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PATCHES")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.Patchset); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.Patchset`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Patchset)
|
|
fc.Result = res
|
|
return ec.marshalOPatchset2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchset(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_createTool(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_createTool_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().CreateTool(rctx, args["patchsetID"].(int), args["details"].(string), args["icon"].(model.ToolIcon))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PATCHES")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.PatchsetTool); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.PatchsetTool`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.PatchsetTool)
|
|
fc.Result = res
|
|
return ec.marshalOPatchsetTool2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetTool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateTool(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_updateTool_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().UpdateTool(rctx, args["id"].(int), args["details"].(*string), args["icon"].(*model.ToolIcon))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PATCHES")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.PatchsetTool); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.PatchsetTool`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.PatchsetTool)
|
|
fc.Result = res
|
|
return ec.marshalOPatchsetTool2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetTool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_mailingListSubscribe(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_mailingListSubscribe_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().MailingListSubscribe(rctx, args["listID"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingListSubscription); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingListSubscription`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingListSubscription)
|
|
fc.Result = res
|
|
return ec.marshalOMailingListSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListSubscription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_mailingListUnsubscribe(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_mailingListUnsubscribe_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().MailingListUnsubscribe(rctx, args["listID"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingListSubscription); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingListSubscription`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingListSubscription)
|
|
fc.Result = res
|
|
return ec.marshalOMailingListSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListSubscription(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patch_index(ctx context.Context, field graphql.CollectedField, obj *model.Patch) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patch",
|
|
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.Index, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*int)
|
|
fc.Result = res
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patch_count(ctx context.Context, field graphql.CollectedField, obj *model.Patch) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patch",
|
|
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.Count, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*int)
|
|
fc.Result = res
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patch_version(ctx context.Context, field graphql.CollectedField, obj *model.Patch) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patch",
|
|
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.Version, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*int)
|
|
fc.Result = res
|
|
return ec.marshalOInt2ᚖint(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patch_prefix(ctx context.Context, field graphql.CollectedField, obj *model.Patch) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patch",
|
|
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.Prefix, 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) _Patch_subject(ctx context.Context, field graphql.CollectedField, obj *model.Patch) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patch",
|
|
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 {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patchset_id(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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) _Patchset_created(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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) _Patchset_updated(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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) _Patchset_subject(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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) _Patchset_version(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.Version, 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) _Patchset_prefix(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.Prefix, 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) _Patchset_status(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.PatchsetStatus)
|
|
fc.Result = res
|
|
return ec.marshalNPatchsetStatus2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetStatus(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patchset_submitter(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.Patchset().Submitter(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.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patchset_coverLetter(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.Patchset().CoverLetter(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.Email); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.Email`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Email)
|
|
fc.Result = res
|
|
return ec.marshalOEmail2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmail(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patchset_thread(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.Patchset().Thread(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.Thread); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.Thread`, 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.Thread)
|
|
fc.Result = res
|
|
return ec.marshalNThread2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThread(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patchset_supersededBy(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.Patchset().SupersededBy(rctx, obj)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Patchset)
|
|
fc.Result = res
|
|
return ec.marshalOPatchset2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchset(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patchset_list(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.Patchset().List(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, 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.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalNMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patchset_patches(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Patchset_patches_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.Patchset().Patches(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.EmailCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.EmailCursor`, 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.EmailCursor)
|
|
fc.Result = res
|
|
return ec.marshalNEmailCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmailCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patchset_tools(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.Patchset().Tools(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.PatchsetTool)
|
|
fc.Result = res
|
|
return ec.marshalNPatchsetTool2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetToolᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Patchset_mbox(ctx context.Context, field graphql.CollectedField, obj *model.Patchset) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Patchset",
|
|
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.Patchset().Mbox(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.URL)
|
|
fc.Result = res
|
|
return ec.marshalNURL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐURL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _PatchsetCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.PatchsetCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PatchsetCursor",
|
|
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.Patchset)
|
|
fc.Result = res
|
|
return ec.marshalNPatchset2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _PatchsetCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.PatchsetCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PatchsetCursor",
|
|
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) _PatchsetTool_id(ctx context.Context, field graphql.CollectedField, obj *model.PatchsetTool) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PatchsetTool",
|
|
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) _PatchsetTool_created(ctx context.Context, field graphql.CollectedField, obj *model.PatchsetTool) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PatchsetTool",
|
|
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) _PatchsetTool_updated(ctx context.Context, field graphql.CollectedField, obj *model.PatchsetTool) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PatchsetTool",
|
|
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) _PatchsetTool_icon(ctx context.Context, field graphql.CollectedField, obj *model.PatchsetTool) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PatchsetTool",
|
|
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.Icon(), 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.ToolIcon)
|
|
fc.Result = res
|
|
return ec.marshalNToolIcon2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐToolIcon(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _PatchsetTool_details(ctx context.Context, field graphql.CollectedField, obj *model.PatchsetTool) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PatchsetTool",
|
|
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.Details, 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) _PatchsetTool_patchset(ctx context.Context, field graphql.CollectedField, obj *model.PatchsetTool) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "PatchsetTool",
|
|
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.PatchsetTool().Patchset(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.Patchset)
|
|
fc.Result = res
|
|
return ec.marshalNPatchset2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchset(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ᚋlistsᚗ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ᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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/lists.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ᚋlistsᚗ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["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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/lists.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ᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_userByName(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_userByName_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().UserByName(rctx, args["username"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PROFILE")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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/lists.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ᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_mailingList(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_mailingList_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().MailingList(rctx, args["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalOMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_mailingListByName(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_mailingListByName_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().MailingListByName(rctx, args["name"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalOMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_mailingListByOwner(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_mailingListByOwner_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().MailingListByOwner(rctx, args["ownerName"].(string), args["listName"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalOMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_email(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_email_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().Email(rctx, args["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.Email); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.Email`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Email)
|
|
fc.Result = res
|
|
return ec.marshalOEmail2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmail(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_message(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_message_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().Message(rctx, args["messageID"].(string))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.Email); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.Email`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Email)
|
|
fc.Result = res
|
|
return ec.marshalOEmail2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmail(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_patchset(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_patchset_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().Patchset(rctx, args["id"].(int))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.Patchset); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.Patchset`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Patchset)
|
|
fc.Result = res
|
|
return ec.marshalOPatchset2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchset(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_mailingLists(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_mailingLists_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().MailingLists(rctx, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingListCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingListCursor`, 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.MailingListCursor)
|
|
fc.Result = res
|
|
return ec.marshalNMailingListCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListCursor(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ᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "SUBSCRIPTIONS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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/lists.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ᚋlistsᚗ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) _Thread_created(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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) _Thread_updated(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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) _Thread_subject(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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) _Thread_replies(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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.Replies, 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) _Thread_participants(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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.Participants, 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) _Thread_sender(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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.Thread().Sender(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.Entity)
|
|
fc.Result = res
|
|
return ec.marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEntity(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Thread_root(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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.Thread().Root(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.Email)
|
|
fc.Result = res
|
|
return ec.marshalNEmail2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmail(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Thread_list(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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.Thread().List(rctx, obj)
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingList); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingList`, 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.MailingList)
|
|
fc.Result = res
|
|
return ec.marshalNMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Thread_descendants(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Thread_descendants_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.Thread().Descendants(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.EmailCursor)
|
|
fc.Result = res
|
|
return ec.marshalNEmailCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmailCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Thread_mailto(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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.Thread().Mailto(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) _Thread_mbox(ctx context.Context, field graphql.CollectedField, obj *model.Thread) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Thread",
|
|
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.Thread().Mbox(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.URL)
|
|
fc.Result = res
|
|
return ec.marshalNURL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐURL(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _ThreadCursor_results(ctx context.Context, field graphql.CollectedField, obj *model.ThreadCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "ThreadCursor",
|
|
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.Thread)
|
|
fc.Result = res
|
|
return ec.marshalNThread2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThreadᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _ThreadCursor_cursor(ctx context.Context, field graphql.CollectedField, obj *model.ThreadCursor) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "ThreadCursor",
|
|
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) _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_lists(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_lists_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().Lists(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "LISTS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.MailingListCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.MailingListCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.MailingListCursor)
|
|
fc.Result = res
|
|
return ec.marshalOMailingListCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_emails(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_emails_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().Emails(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.EmailCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.EmailCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.EmailCursor)
|
|
fc.Result = res
|
|
return ec.marshalOEmailCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmailCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_threads(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_threads_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().Threads(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "EMAILS")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.ThreadCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.ThreadCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.ThreadCursor)
|
|
fc.Result = res
|
|
return ec.marshalOThreadCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThreadCursor(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _User_patches(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_patches_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().Patches(rctx, obj, args["cursor"].(*model1.Cursor))
|
|
}
|
|
directive1 := func(ctx context.Context) (interface{}, error) {
|
|
scope, err := ec.unmarshalNAccessScope2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐAccessScope(ctx, "PATCHES")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
kind, err := ec.unmarshalNAccessKind2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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.PatchsetCursor); ok {
|
|
return data, nil
|
|
}
|
|
return nil, fmt.Errorf(`unexpected type %T from directive, should be *git.sr.ht/~sircmpwn/lists.sr.ht/api/graph/model.PatchsetCursor`, tmp)
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.PatchsetCursor)
|
|
fc.Result = res
|
|
return ec.marshalOPatchsetCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetCursor(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 "reply":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reply"))
|
|
it.Reply, err = ec.unmarshalNBoolean2bool(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "post":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("post"))
|
|
it.Post, err = ec.unmarshalNBoolean2bool(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "moderate":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("moderate"))
|
|
it.Moderate, err = ec.unmarshalNBoolean2bool(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.MailingListACL:
|
|
return ec._MailingListACL(ctx, sel, &obj)
|
|
case *model.MailingListACL:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingListACL(ctx, sel, obj)
|
|
case model.GeneralACL:
|
|
return ec._GeneralACL(ctx, sel, &obj)
|
|
case *model.GeneralACL:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._GeneralACL(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.MailingListSubscription:
|
|
return ec._MailingListSubscription(ctx, sel, &obj)
|
|
case *model.MailingListSubscription:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingListSubscription(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.Mailbox:
|
|
return ec._Mailbox(ctx, sel, &obj)
|
|
case *model.Mailbox:
|
|
if obj == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Mailbox(ctx, sel, obj)
|
|
default:
|
|
panic(fmt.Errorf("unexpected type %T", obj))
|
|
}
|
|
}
|
|
|
|
// endregion ************************** interface.gotpl ***************************
|
|
|
|
// region **************************** object.gotpl ****************************
|
|
|
|
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 emailImplementors = []string{"Email"}
|
|
|
|
func (ec *executionContext) _Email(ctx context.Context, sel ast.SelectionSet, obj *model.Email) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, emailImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Email")
|
|
case "id":
|
|
out.Values[i] = ec._Email_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "sender":
|
|
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._Email_sender(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "received":
|
|
out.Values[i] = ec._Email_received(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "date":
|
|
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._Email_date(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "subject":
|
|
out.Values[i] = ec._Email_subject(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "messageID":
|
|
out.Values[i] = ec._Email_messageID(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "inReplyTo":
|
|
out.Values[i] = ec._Email_inReplyTo(ctx, field, obj)
|
|
case "header":
|
|
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._Email_header(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "addressList":
|
|
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._Email_addressList(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "body":
|
|
out.Values[i] = ec._Email_body(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "envelope":
|
|
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._Email_envelope(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "thread":
|
|
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._Email_thread(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "parent":
|
|
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._Email_parent(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "patch":
|
|
out.Values[i] = ec._Email_patch(ctx, field, obj)
|
|
case "patchset":
|
|
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._Email_patchset(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "list":
|
|
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._Email_list(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 emailCursorImplementors = []string{"EmailCursor"}
|
|
|
|
func (ec *executionContext) _EmailCursor(ctx context.Context, sel ast.SelectionSet, obj *model.EmailCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, emailCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("EmailCursor")
|
|
case "results":
|
|
out.Values[i] = ec._EmailCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._EmailCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var generalACLImplementors = []string{"GeneralACL", "ACL"}
|
|
|
|
func (ec *executionContext) _GeneralACL(ctx context.Context, sel ast.SelectionSet, obj *model.GeneralACL) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, generalACLImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("GeneralACL")
|
|
case "browse":
|
|
out.Values[i] = ec._GeneralACL_browse(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "reply":
|
|
out.Values[i] = ec._GeneralACL_reply(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "post":
|
|
out.Values[i] = ec._GeneralACL_post(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "moderate":
|
|
out.Values[i] = ec._GeneralACL_moderate(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 mailboxImplementors = []string{"Mailbox", "Entity"}
|
|
|
|
func (ec *executionContext) _Mailbox(ctx context.Context, sel ast.SelectionSet, obj *model.Mailbox) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mailboxImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Mailbox")
|
|
case "canonicalName":
|
|
out.Values[i] = ec._Mailbox_canonicalName(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "name":
|
|
out.Values[i] = ec._Mailbox_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "address":
|
|
out.Values[i] = ec._Mailbox_address(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 mailingListImplementors = []string{"MailingList"}
|
|
|
|
func (ec *executionContext) _MailingList(ctx context.Context, sel ast.SelectionSet, obj *model.MailingList) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mailingListImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("MailingList")
|
|
case "id":
|
|
out.Values[i] = ec._MailingList_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._MailingList_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "updated":
|
|
out.Values[i] = ec._MailingList_updated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "name":
|
|
out.Values[i] = ec._MailingList_name(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._MailingList_owner(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "description":
|
|
out.Values[i] = ec._MailingList_description(ctx, field, obj)
|
|
case "permitMime":
|
|
out.Values[i] = ec._MailingList_permitMime(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "rejectMime":
|
|
out.Values[i] = ec._MailingList_rejectMime(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "threads":
|
|
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._MailingList_threads(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "emails":
|
|
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._MailingList_emails(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "patches":
|
|
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._MailingList_patches(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "importing":
|
|
out.Values[i] = ec._MailingList_importing(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "access":
|
|
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._MailingList_access(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._MailingList_subscription(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "archive":
|
|
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._MailingList_archive(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "last30days":
|
|
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._MailingList_last30days(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
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._MailingList_acl(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "nonsubscriber":
|
|
out.Values[i] = ec._MailingList_nonsubscriber(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "subscriber":
|
|
out.Values[i] = ec._MailingList_subscriber(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "identified":
|
|
out.Values[i] = ec._MailingList_identified(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 mailingListACLImplementors = []string{"MailingListACL", "ACL"}
|
|
|
|
func (ec *executionContext) _MailingListACL(ctx context.Context, sel ast.SelectionSet, obj *model.MailingListACL) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mailingListACLImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("MailingListACL")
|
|
case "id":
|
|
out.Values[i] = ec._MailingListACL_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._MailingListACL_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "list":
|
|
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._MailingListACL_list(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._MailingListACL_entity(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "browse":
|
|
out.Values[i] = ec._MailingListACL_browse(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "reply":
|
|
out.Values[i] = ec._MailingListACL_reply(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "post":
|
|
out.Values[i] = ec._MailingListACL_post(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "moderate":
|
|
out.Values[i] = ec._MailingListACL_moderate(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 mailingListACLCursorImplementors = []string{"MailingListACLCursor"}
|
|
|
|
func (ec *executionContext) _MailingListACLCursor(ctx context.Context, sel ast.SelectionSet, obj *model.MailingListACLCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mailingListACLCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("MailingListACLCursor")
|
|
case "results":
|
|
out.Values[i] = ec._MailingListACLCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._MailingListACLCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var mailingListCursorImplementors = []string{"MailingListCursor"}
|
|
|
|
func (ec *executionContext) _MailingListCursor(ctx context.Context, sel ast.SelectionSet, obj *model.MailingListCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mailingListCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("MailingListCursor")
|
|
case "results":
|
|
out.Values[i] = ec._MailingListCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._MailingListCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var mailingListSubscriptionImplementors = []string{"MailingListSubscription", "ActivitySubscription"}
|
|
|
|
func (ec *executionContext) _MailingListSubscription(ctx context.Context, sel ast.SelectionSet, obj *model.MailingListSubscription) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mailingListSubscriptionImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("MailingListSubscription")
|
|
case "id":
|
|
out.Values[i] = ec._MailingListSubscription_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._MailingListSubscription_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "list":
|
|
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._MailingListSubscription_list(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 "createMailingList":
|
|
out.Values[i] = ec._Mutation_createMailingList(ctx, field)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "updateMailingList":
|
|
out.Values[i] = ec._Mutation_updateMailingList(ctx, field)
|
|
case "deleteMailingList":
|
|
out.Values[i] = ec._Mutation_deleteMailingList(ctx, field)
|
|
case "updateUserACL":
|
|
out.Values[i] = ec._Mutation_updateUserACL(ctx, field)
|
|
case "updateSenderACL":
|
|
out.Values[i] = ec._Mutation_updateSenderACL(ctx, field)
|
|
case "updateMailingListACL":
|
|
out.Values[i] = ec._Mutation_updateMailingListACL(ctx, field)
|
|
case "deleteACL":
|
|
out.Values[i] = ec._Mutation_deleteACL(ctx, field)
|
|
case "updatePatchset":
|
|
out.Values[i] = ec._Mutation_updatePatchset(ctx, field)
|
|
case "createTool":
|
|
out.Values[i] = ec._Mutation_createTool(ctx, field)
|
|
case "updateTool":
|
|
out.Values[i] = ec._Mutation_updateTool(ctx, field)
|
|
case "mailingListSubscribe":
|
|
out.Values[i] = ec._Mutation_mailingListSubscribe(ctx, field)
|
|
case "mailingListUnsubscribe":
|
|
out.Values[i] = ec._Mutation_mailingListUnsubscribe(ctx, field)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var patchImplementors = []string{"Patch"}
|
|
|
|
func (ec *executionContext) _Patch(ctx context.Context, sel ast.SelectionSet, obj *model.Patch) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, patchImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Patch")
|
|
case "index":
|
|
out.Values[i] = ec._Patch_index(ctx, field, obj)
|
|
case "count":
|
|
out.Values[i] = ec._Patch_count(ctx, field, obj)
|
|
case "version":
|
|
out.Values[i] = ec._Patch_version(ctx, field, obj)
|
|
case "prefix":
|
|
out.Values[i] = ec._Patch_prefix(ctx, field, obj)
|
|
case "subject":
|
|
out.Values[i] = ec._Patch_subject(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var patchsetImplementors = []string{"Patchset"}
|
|
|
|
func (ec *executionContext) _Patchset(ctx context.Context, sel ast.SelectionSet, obj *model.Patchset) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, patchsetImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Patchset")
|
|
case "id":
|
|
out.Values[i] = ec._Patchset_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._Patchset_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "updated":
|
|
out.Values[i] = ec._Patchset_updated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "subject":
|
|
out.Values[i] = ec._Patchset_subject(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "version":
|
|
out.Values[i] = ec._Patchset_version(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "prefix":
|
|
out.Values[i] = ec._Patchset_prefix(ctx, field, obj)
|
|
case "status":
|
|
out.Values[i] = ec._Patchset_status(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._Patchset_submitter(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "coverLetter":
|
|
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._Patchset_coverLetter(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "thread":
|
|
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._Patchset_thread(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._Patchset_supersededBy(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "list":
|
|
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._Patchset_list(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "patches":
|
|
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._Patchset_patches(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "tools":
|
|
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._Patchset_tools(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "mbox":
|
|
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._Patchset_mbox(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 patchsetCursorImplementors = []string{"PatchsetCursor"}
|
|
|
|
func (ec *executionContext) _PatchsetCursor(ctx context.Context, sel ast.SelectionSet, obj *model.PatchsetCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, patchsetCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("PatchsetCursor")
|
|
case "results":
|
|
out.Values[i] = ec._PatchsetCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._PatchsetCursor_cursor(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var patchsetToolImplementors = []string{"PatchsetTool"}
|
|
|
|
func (ec *executionContext) _PatchsetTool(ctx context.Context, sel ast.SelectionSet, obj *model.PatchsetTool) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, patchsetToolImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("PatchsetTool")
|
|
case "id":
|
|
out.Values[i] = ec._PatchsetTool_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "created":
|
|
out.Values[i] = ec._PatchsetTool_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "updated":
|
|
out.Values[i] = ec._PatchsetTool_updated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "icon":
|
|
out.Values[i] = ec._PatchsetTool_icon(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "details":
|
|
out.Values[i] = ec._PatchsetTool_details(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "patchset":
|
|
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._PatchsetTool_patchset(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 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 "userByName":
|
|
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_userByName(ctx, field)
|
|
return res
|
|
})
|
|
case "mailingList":
|
|
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_mailingList(ctx, field)
|
|
return res
|
|
})
|
|
case "mailingListByName":
|
|
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_mailingListByName(ctx, field)
|
|
return res
|
|
})
|
|
case "mailingListByOwner":
|
|
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_mailingListByOwner(ctx, field)
|
|
return res
|
|
})
|
|
case "email":
|
|
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_email(ctx, field)
|
|
return res
|
|
})
|
|
case "message":
|
|
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_message(ctx, field)
|
|
return res
|
|
})
|
|
case "patchset":
|
|
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_patchset(ctx, field)
|
|
return res
|
|
})
|
|
case "mailingLists":
|
|
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_mailingLists(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
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 threadImplementors = []string{"Thread"}
|
|
|
|
func (ec *executionContext) _Thread(ctx context.Context, sel ast.SelectionSet, obj *model.Thread) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, threadImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Thread")
|
|
case "created":
|
|
out.Values[i] = ec._Thread_created(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "updated":
|
|
out.Values[i] = ec._Thread_updated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "subject":
|
|
out.Values[i] = ec._Thread_subject(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "replies":
|
|
out.Values[i] = ec._Thread_replies(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "participants":
|
|
out.Values[i] = ec._Thread_participants(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "sender":
|
|
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._Thread_sender(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "root":
|
|
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._Thread_root(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "list":
|
|
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._Thread_list(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "descendants":
|
|
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._Thread_descendants(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "mailto":
|
|
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._Thread_mailto(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "mbox":
|
|
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._Thread_mbox(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 threadCursorImplementors = []string{"ThreadCursor"}
|
|
|
|
func (ec *executionContext) _ThreadCursor(ctx context.Context, sel ast.SelectionSet, obj *model.ThreadCursor) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, threadCursorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("ThreadCursor")
|
|
case "results":
|
|
out.Values[i] = ec._ThreadCursor_results(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "cursor":
|
|
out.Values[i] = ec._ThreadCursor_cursor(ctx, field, obj)
|
|
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 "lists":
|
|
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_lists(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "emails":
|
|
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_emails(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "threads":
|
|
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_threads(ctx, field, obj)
|
|
return res
|
|
})
|
|
case "patches":
|
|
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_patches(ctx, field, obj)
|
|
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) marshalNACL2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐACL(ctx context.Context, sel ast.SelectionSet, v model.ACL) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._ACL(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNACLInput2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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ᚋlistsᚗ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ᚋlistsᚗ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ᚋlistsᚗ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ᚋlistsᚗ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ᚋlistsᚗ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ᚋlistsᚗ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ᚋlistsᚗ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) 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) marshalNEmail2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmail(ctx context.Context, sel ast.SelectionSet, v model.Email) graphql.Marshaler {
|
|
return ec._Email(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEmail2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmailᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Email) 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.marshalNEmail2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmail(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) marshalNEmail2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmail(ctx context.Context, sel ast.SelectionSet, v *model.Email) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Email(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEmailCursor2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmailCursor(ctx context.Context, sel ast.SelectionSet, v model.EmailCursor) graphql.Marshaler {
|
|
return ec._EmailCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEmailCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmailCursor(ctx context.Context, sel ast.SelectionSet, v *model.EmailCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._EmailCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNEntity2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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) marshalNGeneralACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐGeneralACL(ctx context.Context, sel ast.SelectionSet, v *model.GeneralACL) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._GeneralACL(ctx, sel, 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) marshalNMailbox2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailboxᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Mailbox) 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.marshalNMailbox2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailbox(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) marshalNMailbox2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailbox(ctx context.Context, sel ast.SelectionSet, v *model.Mailbox) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Mailbox(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMailingList2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx context.Context, sel ast.SelectionSet, v model.MailingList) graphql.Marshaler {
|
|
return ec._MailingList(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMailingList2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.MailingList) 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.marshalNMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(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) marshalNMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx context.Context, sel ast.SelectionSet, v *model.MailingList) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingList(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMailingListACL2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACLᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.MailingListACL) 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.marshalNMailingListACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACL(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) marshalNMailingListACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACL(ctx context.Context, sel ast.SelectionSet, v *model.MailingListACL) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingListACL(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMailingListACLCursor2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACLCursor(ctx context.Context, sel ast.SelectionSet, v model.MailingListACLCursor) graphql.Marshaler {
|
|
return ec._MailingListACLCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMailingListACLCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACLCursor(ctx context.Context, sel ast.SelectionSet, v *model.MailingListACLCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingListACLCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMailingListCursor2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListCursor(ctx context.Context, sel ast.SelectionSet, v model.MailingListCursor) graphql.Marshaler {
|
|
return ec._MailingListCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMailingListCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListCursor(ctx context.Context, sel ast.SelectionSet, v *model.MailingListCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingListCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNMailingListInput2map(ctx context.Context, v interface{}) (map[string]interface{}, error) {
|
|
return v.(map[string]interface{}), nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPatchset2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchset(ctx context.Context, sel ast.SelectionSet, v model.Patchset) graphql.Marshaler {
|
|
return ec._Patchset(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPatchset2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Patchset) 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.marshalNPatchset2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchset(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) marshalNPatchset2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchset(ctx context.Context, sel ast.SelectionSet, v *model.Patchset) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Patchset(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPatchsetCursor2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetCursor(ctx context.Context, sel ast.SelectionSet, v model.PatchsetCursor) graphql.Marshaler {
|
|
return ec._PatchsetCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPatchsetCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetCursor(ctx context.Context, sel ast.SelectionSet, v *model.PatchsetCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._PatchsetCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNPatchsetStatus2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetStatus(ctx context.Context, v interface{}) (model.PatchsetStatus, error) {
|
|
var res model.PatchsetStatus
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPatchsetStatus2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetStatus(ctx context.Context, sel ast.SelectionSet, v model.PatchsetStatus) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalNPatchsetTool2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetToolᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.PatchsetTool) 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.marshalNPatchsetTool2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetTool(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) marshalNPatchsetTool2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetTool(ctx context.Context, sel ast.SelectionSet, v *model.PatchsetTool) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._PatchsetTool(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) unmarshalNString2ᚕ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.unmarshalNString2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNString2string(ctx, sel, v[i])
|
|
}
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNThread2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThread(ctx context.Context, sel ast.SelectionSet, v model.Thread) graphql.Marshaler {
|
|
return ec._Thread(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNThread2ᚕᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThreadᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Thread) 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.marshalNThread2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThread(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) marshalNThread2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThread(ctx context.Context, sel ast.SelectionSet, v *model.Thread) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Thread(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNThreadCursor2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThreadCursor(ctx context.Context, sel ast.SelectionSet, v model.ThreadCursor) graphql.Marshaler {
|
|
return ec._ThreadCursor(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNThreadCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThreadCursor(ctx context.Context, sel ast.SelectionSet, v *model.ThreadCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._ThreadCursor(ctx, sel, 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) unmarshalNToolIcon2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐToolIcon(ctx context.Context, v interface{}) (model.ToolIcon, error) {
|
|
var res model.ToolIcon
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNToolIcon2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐToolIcon(ctx context.Context, sel ast.SelectionSet, v model.ToolIcon) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNURL2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐURL(ctx context.Context, v interface{}) (model.URL, error) {
|
|
var res model.URL
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNURL2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐURL(ctx context.Context, sel ast.SelectionSet, v model.URL) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNURL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐURL(ctx context.Context, v interface{}) (*model.URL, error) {
|
|
var res = new(model.URL)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNURL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐURL(ctx context.Context, sel ast.SelectionSet, v *model.URL) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalNUser2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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ᚋlistsᚗ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ᚋlistsᚗ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ᚋlistsᚗ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) 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) marshalOActivitySubscriptionCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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) 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) marshalOEmail2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmail(ctx context.Context, sel ast.SelectionSet, v *model.Email) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Email(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOEmailCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐEmailCursor(ctx context.Context, sel ast.SelectionSet, v *model.EmailCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._EmailCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalInt(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalInt(*v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOMailingList2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingList(ctx context.Context, sel ast.SelectionSet, v *model.MailingList) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingList(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOMailingListACL2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListACL(ctx context.Context, sel ast.SelectionSet, v *model.MailingListACL) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingListACL(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOMailingListCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListCursor(ctx context.Context, sel ast.SelectionSet, v *model.MailingListCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingListCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOMailingListSubscription2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐMailingListSubscription(ctx context.Context, sel ast.SelectionSet, v *model.MailingListSubscription) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._MailingListSubscription(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOPatch2gitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatch(ctx context.Context, sel ast.SelectionSet, v model.Patch) graphql.Marshaler {
|
|
return ec._Patch(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOPatchset2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchset(ctx context.Context, sel ast.SelectionSet, v *model.Patchset) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Patchset(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOPatchsetCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetCursor(ctx context.Context, sel ast.SelectionSet, v *model.PatchsetCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._PatchsetCursor(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOPatchsetTool2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐPatchsetTool(ctx context.Context, sel ast.SelectionSet, v *model.PatchsetTool) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._PatchsetTool(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
|
|
}
|
|
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.unmarshalNString2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNString2string(ctx, sel, v[i])
|
|
}
|
|
|
|
for _, e := range ret {
|
|
if e == graphql.Null {
|
|
return graphql.Null
|
|
}
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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) marshalOThreadCursor2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐThreadCursor(ctx context.Context, sel ast.SelectionSet, v *model.ThreadCursor) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._ThreadCursor(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) unmarshalOToolIcon2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐToolIcon(ctx context.Context, v interface{}) (*model.ToolIcon, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model.ToolIcon)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOToolIcon2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗsrᚗhtᚋapiᚋgraphᚋmodelᚐToolIcon(ctx context.Context, sel ast.SelectionSet, v *model.ToolIcon) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalOUser2ᚖgitᚗsrᚗhtᚋאsircmpwnᚋlistsᚗ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) 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 *****************************
|