aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/handler.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-07 01:00:32 +0100
committerGitHub <noreply@github.com>2020-02-07 01:00:32 +0100
commit1a3cbdc4185c50a5896f84c6c7103aac9bf97105 (patch)
tree3a38fab6533b60631d2d2df31333d2c7c05535bb /graphql/handler.go
parentf093be96e98284580d61664adecd0a2ff8b354e4 (diff)
parent2ebf43c988c73dcd9f5471622c0d1a466f454c37 (diff)
downloadgit-bug-1a3cbdc4185c50a5896f84c6c7103aac9bf97105.tar.gz
Merge pull request #305 from MichaelMure/gomod
migrate to go modules, update gqlgen
Diffstat (limited to 'graphql/handler.go')
-rw-r--r--graphql/handler.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/graphql/handler.go b/graphql/handler.go
index aadcf4cb..55ef6fc4 100644
--- a/graphql/handler.go
+++ b/graphql/handler.go
@@ -6,7 +6,8 @@ package graphql
import (
"net/http"
- "github.com/99designs/gqlgen/handler"
+ "github.com/99designs/gqlgen/graphql/handler"
+
"github.com/MichaelMure/git-bug/graphql/graph"
"github.com/MichaelMure/git-bug/graphql/resolvers"
"github.com/MichaelMure/git-bug/repository"
@@ -14,7 +15,7 @@ import (
// Handler is the root GraphQL http handler
type Handler struct {
- http.HandlerFunc
+ http.Handler
*resolvers.RootResolver
}
@@ -32,7 +33,7 @@ func NewHandler(repo repository.ClockedRepo) (Handler, error) {
Resolvers: h.RootResolver,
}
- h.HandlerFunc = handler.GraphQL(graph.NewExecutableSchema(config))
+ h.Handler = handler.NewDefaultServer(graph.NewExecutableSchema(config))
return h, nil
}