aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/resolvers/root.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-29 18:58:42 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-29 18:58:42 +0200
commit8fa0b258ac89781dae269790a4bde09cbcd2f324 (patch)
treeb9bcf0826f5739f128de52123447cede23291c02 /graphql/resolvers/root.go
parent6363518c85cbd8247a5f6507b8a1dd3903cfb71d (diff)
downloadgit-bug-8fa0b258ac89781dae269790a4bde09cbcd2f324.tar.gz
cleaning
Diffstat (limited to 'graphql/resolvers/root.go')
-rw-r--r--graphql/resolvers/root.go53
1 files changed, 53 insertions, 0 deletions
diff --git a/graphql/resolvers/root.go b/graphql/resolvers/root.go
new file mode 100644
index 00000000..e5f83060
--- /dev/null
+++ b/graphql/resolvers/root.go
@@ -0,0 +1,53 @@
+package resolvers
+
+import (
+ "github.com/MichaelMure/git-bug/cache"
+)
+
+type RootResolver struct {
+ cache.RootCache
+}
+
+func NewRootResolver() *RootResolver {
+ return &RootResolver{
+ RootCache: cache.NewCache(),
+ }
+}
+
+func (r RootResolver) Query() QueryResolver {
+ return &rootQueryResolver{
+ cache: &r.RootCache,
+ }
+}
+
+func (RootResolver) AddCommentOperation() AddCommentOperationResolver {
+ return &addCommentOperationResolver{}
+}
+
+func (r RootResolver) Bug() BugResolver {
+ return &bugResolver{
+ cache: &r.RootCache,
+ }
+}
+
+func (RootResolver) CreateOperation() CreateOperationResolver {
+ return &createOperationResolver{}
+}
+
+func (RootResolver) LabelChangeOperation() LabelChangeOperationResolver {
+ return &labelChangeOperation{}
+}
+
+func (r RootResolver) Repository() RepositoryResolver {
+ return &repoResolver{
+ cache: &r.RootCache,
+ }
+}
+
+func (RootResolver) SetStatusOperation() SetStatusOperationResolver {
+ return &setStatusOperationResolver{}
+}
+
+func (RootResolver) SetTitleOperation() SetTitleOperationResolver {
+ return &setTitleOperationResolver{}
+}