diff options
author | Michael Muré <batolettre@gmail.com> | 2018-08-27 12:15:41 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-08-27 12:15:41 +0200 |
commit | fba56eda834955161f39cf135ba06759f58de22b (patch) | |
tree | b59cf40c84a43ec72b9c3374ad99c052b44d7ccd /graphql/resolvers | |
parent | 0514edad1a6ee06902841e0c903fc2a2119b7e95 (diff) | |
download | git-bug-fba56eda834955161f39cf135ba06759f58de22b.tar.gz |
better naming for the graphql-s root resolver
Diffstat (limited to 'graphql/resolvers')
-rw-r--r-- | graphql/resolvers/root.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/graphql/resolvers/root.go b/graphql/resolvers/root.go index 2cf629cd..767e82d2 100644 --- a/graphql/resolvers/root.go +++ b/graphql/resolvers/root.go @@ -5,52 +5,52 @@ import ( "github.com/MichaelMure/git-bug/graphql/graph" ) -type Backend struct { +type RootResolver struct { cache.RootCache } -func NewBackend() *Backend { - return &Backend{ +func NewRootResolver() *RootResolver { + return &RootResolver{ RootCache: cache.NewCache(), } } -func (r Backend) Query() graph.QueryResolver { +func (r RootResolver) Query() graph.QueryResolver { return &rootQueryResolver{ cache: &r.RootCache, } } -func (r Backend) Mutation() graph.MutationResolver { +func (r RootResolver) Mutation() graph.MutationResolver { return &mutationResolver{ cache: &r.RootCache, } } -func (Backend) AddCommentOperation() graph.AddCommentOperationResolver { +func (RootResolver) AddCommentOperation() graph.AddCommentOperationResolver { return &addCommentOperationResolver{} } -func (r Backend) Bug() graph.BugResolver { +func (r RootResolver) Bug() graph.BugResolver { return &bugResolver{} } -func (Backend) CreateOperation() graph.CreateOperationResolver { +func (RootResolver) CreateOperation() graph.CreateOperationResolver { return &createOperationResolver{} } -func (Backend) LabelChangeOperation() graph.LabelChangeOperationResolver { +func (RootResolver) LabelChangeOperation() graph.LabelChangeOperationResolver { return &labelChangeOperation{} } -func (r Backend) Repository() graph.RepositoryResolver { +func (r RootResolver) Repository() graph.RepositoryResolver { return &repoResolver{} } -func (Backend) SetStatusOperation() graph.SetStatusOperationResolver { +func (RootResolver) SetStatusOperation() graph.SetStatusOperationResolver { return &setStatusOperationResolver{} } -func (Backend) SetTitleOperation() graph.SetTitleOperationResolver { +func (RootResolver) SetTitleOperation() graph.SetTitleOperationResolver { return &setTitleOperationResolver{} } |