Files
upstream-traggo/graphql/directive.go
upstream-mirror cda7c1a474
Some checks failed
build / build (push) Failing after 3s
snapshot of https://github.com/traggo/server.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 05:24:45 +05:00

14 lines
262 B
Go

package graphql
import (
"github.com/traggo/server/auth"
"github.com/traggo/server/generated/gqlschema"
)
// NewDirective creates a new directive.
func NewDirective() gqlschema.DirectiveRoot {
return gqlschema.DirectiveRoot{
HasRole: auth.HasRole(),
}
}