aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'graphql/handler.go')
-rw-r--r--graphql/handler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/graphql/handler.go b/graphql/handler.go
index b452d828..8448d1d2 100644
--- a/graphql/handler.go
+++ b/graphql/handler.go
@@ -12,20 +12,20 @@ import (
type Handler struct {
http.HandlerFunc
- *resolvers.Backend
+ *resolvers.RootResolver
}
func NewHandler(repo repository.Repo) (Handler, error) {
h := Handler{
- Backend: resolvers.NewBackend(),
+ RootResolver: resolvers.NewRootResolver(),
}
- err := h.Backend.RegisterDefaultRepository(repo)
+ err := h.RootResolver.RegisterDefaultRepository(repo)
if err != nil {
return Handler{}, err
}
- h.HandlerFunc = handler.GraphQL(graph.NewExecutableSchema(h.Backend))
+ h.HandlerFunc = handler.GraphQL(graph.NewExecutableSchema(h.RootResolver))
return h, nil
}