authorizer/server/handlers/playground.go
2022-01-17 11:32:13 +05:30

16 lines
333 B
Go

package handlers
import (
"github.com/99designs/gqlgen/graphql/playground"
"github.com/gin-gonic/gin"
)
// PlaygroundHandler is the handler for the /playground route
func PlaygroundHandler() gin.HandlerFunc {
h := playground.Handler("GraphQL", "/graphql")
return func(c *gin.Context) {
h.ServeHTTP(c.Writer, c.Request)
}
}