Documentation
¶
Index ¶
- Variables
- func Auth(ctx context.Context, obj any, next graphql.Resolver) (any, error)
- func CacheData(ctx context.Context, obj any, next graphql.Resolver, ttl int, keyTmp *string, ...) (res any, err error)
- func HasPermissions[T user.Model, A account.Model](ctx context.Context, obj any, next graphql.Resolver, perms []string) (any, error)
- func SkipNoPermissions(ctx context.Context, obj any, next graphql.Resolver, perms []string) (any, error)
- func ValidateLength(ctx context.Context, obj any, next graphql.Resolver, min, max int, ...) (res any, err error)
- func ValidateNotEmpty(ctx context.Context, obj any, next graphql.Resolver, trim, ornil bool) (res any, err error)
- func ValidateRange(ctx context.Context, obj any, next graphql.Resolver, min, max float64, ...) (res any, err error)
- func ValidateRegex(ctx context.Context, obj any, next graphql.Resolver, pattern string, ...) (res any, err error)
- type CacheDecodable
- type CacheEncodable
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CacheData ¶ added in v0.3.0
func CacheData(ctx context.Context, obj any, next graphql.Resolver, ttl int, keyTmp *string, fields []string) (res any, err error)
CacheData is a GraphQL directive that caches the result of a field/method for a specified time to live (ttl) in seconds.
func HasPermissions ¶
func HasPermissions[T user.Model, A account.Model](ctx context.Context, obj any, next graphql.Resolver, perms []string) (any, error)
HasPermissions for this user to the particular permission of the object
func SkipNoPermissions ¶
func SkipNoPermissions(ctx context.Context, obj any, next graphql.Resolver, perms []string) (any, error)
SkipNoPermissions directive to skip resolver if no permissions
func ValidateLength ¶ added in v0.5.0
func ValidateNotEmpty ¶ added in v0.5.0
func ValidateRange ¶ added in v0.5.0
Types ¶
type CacheDecodable ¶ added in v0.3.6
type CacheEncodable ¶ added in v0.3.6
Click to show internal directories.
Click to hide internal directories.