snapshot of https://github.com/traggo/server.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
build / build (push) Failing after 3s
Some checks failed
build / build (push) Failing after 3s
This commit is contained in:
13
graphql/directive.go
Normal file
13
graphql/directive.go
Normal file
@@ -0,0 +1,13 @@
|
||||
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(),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user