authorizer/server/handlers/playground.go
2021-07-23 14:25:32 +05:30

15 lines
271 B
Go

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