diff options
Diffstat (limited to 'graphql/handler.go')
-rw-r--r-- | graphql/handler.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/graphql/handler.go b/graphql/handler.go index 8448d1d2..7b940d8f 100644 --- a/graphql/handler.go +++ b/graphql/handler.go @@ -3,10 +3,10 @@ package graphql import ( + "github.com/99designs/gqlgen/handler" "github.com/MichaelMure/git-bug/graphql/graph" "github.com/MichaelMure/git-bug/graphql/resolvers" "github.com/MichaelMure/git-bug/repository" - "github.com/vektah/gqlgen/handler" "net/http" ) @@ -25,7 +25,11 @@ func NewHandler(repo repository.Repo) (Handler, error) { return Handler{}, err } - h.HandlerFunc = handler.GraphQL(graph.NewExecutableSchema(h.RootResolver)) + config := graph.Config{ + Resolvers: h.RootResolver, + } + + h.HandlerFunc = handler.GraphQL(graph.NewExecutableSchema(config)) return h, nil } |