git-bug/graphql/resolvers/root.go

55 lines
1.1 KiB
Go
Raw Normal View History

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
)
type Backend struct {
2018-07-29 19:11:33 +03:00
cache.RootCache
}
func NewBackend() *Backend {
return &Backend{
2018-07-29 19:11:33 +03:00
RootCache: cache.NewCache(),
}
}
func (r Backend) Query() graph.QueryResolver {
2018-07-29 19:11:33 +03:00
return &rootQueryResolver{
cache: &r.RootCache,
}
}
func (Backend) AddCommentOperation() graph.AddCommentOperationResolver {
2018-07-29 19:11:33 +03:00
return &addCommentOperationResolver{}
}
func (r Backend) Bug() graph.BugResolver {
return &bugResolver{}
2018-07-29 19:11:33 +03:00
}
func (Backend) CreateOperation() graph.CreateOperationResolver {
2018-07-29 19:11:33 +03:00
return &createOperationResolver{}
}
func (Backend) LabelChangeOperation() graph.LabelChangeOperationResolver {
2018-07-29 19:11:33 +03:00
return &labelChangeOperation{}
}
func (r Backend) Repository() graph.RepositoryResolver {
return &repoResolver{}
2018-07-29 19:11:33 +03:00
}
func (Backend) SetStatusOperation() graph.SetStatusOperationResolver {
2018-07-29 19:11:33 +03:00
return &setStatusOperationResolver{}
}
func (Backend) SetTitleOperation() graph.SetTitleOperationResolver {
2018-07-29 19:11:33 +03:00
return &setTitleOperationResolver{}
}
2018-07-30 02:08:45 +03:00
func (r Backend) RepositoryMutation() graph.RepositoryMutationResolver {
return &repoMutationResolver{}
}