blob: 507cb508b5b1861161755eb5bcf9e9c84cf51090 (
plain) (
tree)
|
|
//go:generate go run gen_graphql.go
package graphql
import (
"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"
)
func NewHandler(repo repository.Repo) http.Handler {
backend := resolvers.NewBackend()
backend.RegisterDefaultRepository(repo)
return handler.GraphQL(graph.NewExecutableSchema(backend))
}
|