diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-07 01:00:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 01:00:32 +0100 |
commit | 1a3cbdc4185c50a5896f84c6c7103aac9bf97105 (patch) | |
tree | 3a38fab6533b60631d2d2df31333d2c7c05535bb /graphql/handler.go | |
parent | f093be96e98284580d61664adecd0a2ff8b354e4 (diff) | |
parent | 2ebf43c988c73dcd9f5471622c0d1a466f454c37 (diff) | |
download | git-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.go | 7 |
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 } |