authorizer/server/handlers/playground.go

16 lines
333 B
Go
Raw Normal View History

package handlers
import (
"github.com/99designs/gqlgen/graphql/playground"
"github.com/gin-gonic/gin"
)
2022-01-17 06:02:13 +00:00
// 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)
}
}