mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 18:23:08 +03:00
18 lines
280 B
Go
18 lines
280 B
Go
package graphql
|
|
|
|
import "github.com/graphql-go/handler"
|
|
|
|
func NewHandler() (*handler.Handler, error) {
|
|
schema, err := graphqlSchema()
|
|
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return handler.New(&handler.Config{
|
|
Schema: &schema,
|
|
Pretty: true,
|
|
GraphiQL: true,
|
|
}), nil
|
|
}
|