git-bug/graphql/resolvers/root.go

92 lines
2.2 KiB
Go
Raw Normal View History

2018-09-16 14:50:53 +03:00
// Package resolvers contains the various GraphQL resolvers
2018-07-29 19:11:33 +03:00
package resolvers
import (
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/graphql/graph"
2018-07-29 19:11:33 +03:00
)
var _ graph.ResolverRoot = &RootResolver{}
type RootResolver struct {
cache.MultiRepoCache
2018-07-29 19:11:33 +03:00
}
func NewRootResolver() *RootResolver {
return &RootResolver{
MultiRepoCache: cache.NewMultiRepoCache(),
2018-07-29 19:11:33 +03:00
}
}
func (r RootResolver) Query() graph.QueryResolver {
2018-07-29 19:11:33 +03:00
return &rootQueryResolver{
cache: &r.MultiRepoCache,
2018-07-29 19:11:33 +03:00
}
}
func (r RootResolver) Mutation() graph.MutationResolver {
return &mutationResolver{
cache: &r.MultiRepoCache,
}
}
2018-09-30 12:00:39 +03:00
func (RootResolver) Bug() graph.BugResolver {
return &bugResolver{}
2018-07-29 19:11:33 +03:00
}
2019-01-19 18:01:06 +03:00
func (r RootResolver) Identity() graph.IdentityResolver {
return &identityResolver{}
}
2018-09-30 12:00:39 +03:00
func (RootResolver) CommentHistoryStep() graph.CommentHistoryStepResolver {
return &commentHistoryStepResolver{}
}
func (RootResolver) AddCommentTimelineItem() graph.AddCommentTimelineItemResolver {
return &addCommentTimelineItemResolver{}
2018-09-30 12:00:39 +03:00
}
func (RootResolver) CreateTimelineItem() graph.CreateTimelineItemResolver {
return &createTimelineItemResolver{}
}
func (r RootResolver) LabelChangeTimelineItem() graph.LabelChangeTimelineItemResolver {
return &labelChangeTimelineItem{}
}
func (r RootResolver) SetStatusTimelineItem() graph.SetStatusTimelineItemResolver {
return &setStatusTimelineItem{}
}
func (r RootResolver) SetTitleTimelineItem() graph.SetTitleTimelineItemResolver {
return &setTitleTimelineItem{}
}
func (RootResolver) CreateOperation() graph.CreateOperationResolver {
2018-07-29 19:11:33 +03:00
return &createOperationResolver{}
}
2018-10-07 18:41:47 +03:00
func (RootResolver) AddCommentOperation() graph.AddCommentOperationResolver {
return &addCommentOperationResolver{}
}
func (r RootResolver) EditCommentOperation() graph.EditCommentOperationResolver {
return &editCommentOperationResolver{}
}
func (RootResolver) LabelChangeOperation() graph.LabelChangeOperationResolver {
2018-07-29 19:11:33 +03:00
return &labelChangeOperation{}
}
2018-09-30 12:00:39 +03:00
func (RootResolver) Repository() graph.RepositoryResolver {
return &repoResolver{}
2018-07-29 19:11:33 +03:00
}
func (RootResolver) SetStatusOperation() graph.SetStatusOperationResolver {
2018-07-29 19:11:33 +03:00
return &setStatusOperationResolver{}
}
func (RootResolver) SetTitleOperation() graph.SetTitleOperationResolver {
2018-07-29 19:11:33 +03:00
return &setTitleOperationResolver{}
}